fix some bugs from Sonar 06032019

This commit is contained in:
Ingmar Goudt 2019-03-06 23:01:05 +01:00
parent e68b79336a
commit ee3f592186
6 changed files with 20 additions and 31 deletions

View file

@ -224,7 +224,6 @@ public class ChatPanelBasic extends javax.swing.JPanel {
StringBuilder text = new StringBuilder();
if (time != null) {
text.append(getColoredText(TIMESTAMP_COLOR, timeFormatter.format(time) + ": "));
//this.txtConversation.append(TIMESTAMP_COLOR, time + " ");
}
String userColor;
String textColor;
@ -239,11 +238,7 @@ public class ChatPanelBasic extends javax.swing.JPanel {
userColor = USER_INFO_COLOR;
break;
default:
if (parentChatRef != null) {
userColor = SessionHandler.getUserName().equals(username) ? MY_COLOR : OPPONENT_COLOR;
} else {
userColor = SessionHandler.getUserName().equals(username) ? MY_COLOR : OPPONENT_COLOR;
}
userColor = SessionHandler.getUserName().equals(username) ? MY_COLOR : OPPONENT_COLOR;
textColor = MESSAGE_COLOR;
userSeparator = ": ";
}