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

@ -50,7 +50,7 @@ import org.apache.log4j.Logger;
public class ChatManager {
private static final Logger logger = Logger.getLogger(ChatManager.class);
private static HashMap<String, String> userMessages = new HashMap<>();
private static final HashMap<String, String> userMessages = new HashMap<>();
private static final ChatManager INSTANCE = new ChatManager();
@ -117,7 +117,7 @@ public class ChatManager {
return false;
}
Pattern cardNamePattern = Pattern.compile("\\[(.*?)\\]");
final Pattern cardNamePattern = Pattern.compile("\\[(.*?)\\]");
public void broadcast(UUID chatId, String userName, String message, MessageColor color, boolean withTime, MessageType messageType, SoundToPlay soundToPlay) {
ChatSession chatSession = chatSessions.get(chatId);