SteamWar/BauSystem2.0
Archiviert
12
0

Remove sout
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-08-26 20:47:01 +02:00
Ursprung 5758820679
Commit def07fe50c

Datei anzeigen

@ -34,7 +34,6 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicLong;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -62,13 +61,10 @@ public class LinkageUtils {
} }
private void internalLinkOrUnlink(boolean unlink, Class<?> toLink) { private void internalLinkOrUnlink(boolean unlink, Class<?> toLink) {
AtomicLong totalTime = new AtomicLong();
try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(BauSystem.class.getResourceAsStream("/de.steamwar.bausystem/" + toLink.getTypeName().replace("$", "."))))) { try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(BauSystem.class.getResourceAsStream("/de.steamwar.bausystem/" + toLink.getTypeName().replace("$", "."))))) {
bufferedReader.lines().forEach(s -> { bufferedReader.lines().forEach(s -> {
try { try {
long time = System.currentTimeMillis();
linkOrUnlink(Class.forName(s), unlink); linkOrUnlink(Class.forName(s), unlink);
totalTime.addAndGet(System.currentTimeMillis() - time);
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
// ignored // ignored
} catch (Exception e) { } catch (Exception e) {
@ -80,7 +76,6 @@ public class LinkageUtils {
} catch (NullPointerException e) { } catch (NullPointerException e) {
// Ignored // Ignored
} }
BauSystem.getInstance().getLogger().info("Linkage took " + totalTime + "ms");
} }
private void internalLinkFields() { private void internalLinkFields() {