excessive lambda usage

This commit is contained in:
vyacheslav.raskulin 2020-09-09 15:06:49 +03:00
parent 8b31333d9d
commit b3dc0f5eca
9 changed files with 31 additions and 30 deletions

View file

@ -78,7 +78,7 @@ public class CallbackClientImpl implements CallbackClient {
ChatMessage message = (ChatMessage) callback.getData();
// Drop messages from ignored users
if (message.getUsername() != null && IgnoreList.IGNORED_MESSAGE_TYPES.contains(message.getMessageType())) {
final String serverAddress = SessionHandler.getSession().getServerHostname().orElseGet(() -> "");
final String serverAddress = SessionHandler.getSession().getServerHostname().orElse("");
if (IgnoreList.userIsIgnored(serverAddress, message.getUsername())) {
break;
}
@ -451,7 +451,7 @@ public class CallbackClientImpl implements CallbackClient {
null, null, MessageType.USER_INFO, ChatMessage.MessageColor.BLUE);
break;
case TABLES:
String serverAddress = SessionHandler.getSession().getServerHostname().orElseGet(() -> "");
String serverAddress = SessionHandler.getSession().getServerHostname().orElse("");
usedPanel.receiveMessage("", new StringBuilder("Download card images by using the \"Images\" main menu.")
.append("<br/>Download icons and symbols by using the \"Symbols\" main menu.")
.append("<br/>\\list - show a list of available chat commands.")