Big refactoring (server)

I used Intellij IDEA to automatically refactor code to achive 3 goals.
1) get rid of anonymouse classes, and replace the with lamba to get more readeable and clean code (like in TableWaitingDialog).
2) make effectively final  variables actually final to avoid inadvertent changes on it in further releases and keep objects as immutable, as possible.
3)  Get rid of unused imports (most of the changes) in whole project classes.
This commit is contained in:
vraskulin 2017-01-09 19:47:03 +03:00
parent 076840df53
commit 46d369c8ed
31 changed files with 510 additions and 822 deletions

View file

@ -92,7 +92,7 @@ public class Main {
private static final File pluginFolder = new File("plugins");
private static final File extensionFolder = new File("extensions");
public static PluginClassLoader classLoader = new PluginClassLoader();
public static final PluginClassLoader classLoader = new PluginClassLoader();
public static TransporterServer server;
protected static boolean testMode;
protected static boolean fastDbMode;
@ -437,12 +437,7 @@ public class Main {
directory.mkdirs();
}
File[] files = directory.listFiles(
new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.endsWith(".game");
}
}
(dir, name) -> name.endsWith(".game")
);
for (File file : files) {
file.delete();