forked from External/mage
All 1-character strings converted to primitives
"b" + "r" now changed to 'b' + 'w'. It's more straight-forward, and may cause perfomance improvements - character primitives allocation is faster and less expensive than string creation.
This commit is contained in:
parent
31589778ca
commit
f60ebfbb1f
451 changed files with 989 additions and 978 deletions
|
|
@ -67,7 +67,7 @@ public class ChatSession {
|
|||
if (!clients.containsKey(userId)) {
|
||||
String userName = user.getName();
|
||||
clients.put(userId, userName);
|
||||
broadcast(null, userName + " has joined (" + user.getClientVersion() + ")", MessageColor.BLUE, true, MessageType.STATUS, null);
|
||||
broadcast(null, userName + " has joined (" + user.getClientVersion() + ')', MessageColor.BLUE, true, MessageType.STATUS, null);
|
||||
logger.trace(userName + " joined chat " + chatId);
|
||||
}
|
||||
});
|
||||
|
|
@ -84,7 +84,7 @@ public class ChatSession {
|
|||
String userName = clients.get(userId);
|
||||
if (reason != DisconnectReason.LostConnection) { // for lost connection the user will be reconnected or session expire so no remove of chat yet
|
||||
clients.remove(userId);
|
||||
logger.debug(userName + "(" + reason.toString() + ")" + " removed from chatId " + chatId);
|
||||
logger.debug(userName + '(' + reason.toString() + ')' + " removed from chatId " + chatId);
|
||||
}
|
||||
String message;
|
||||
switch (reason) {
|
||||
|
|
@ -107,7 +107,7 @@ public class ChatSession {
|
|||
message = null;
|
||||
break;
|
||||
default:
|
||||
message = " left (" + reason.toString() + ")";
|
||||
message = " left (" + reason.toString() + ')';
|
||||
}
|
||||
if (message != null) {
|
||||
broadcast(null, userName + message, MessageColor.BLUE, true, MessageType.STATUS, null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue