Skip to content

Commit

Permalink
use isEmpty() instead of equals("")
Browse files Browse the repository at this point in the history
  • Loading branch information
kforbro committed Oct 26, 2021
1 parent 930f73d commit a91af74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public static String getCommandDeniedMessage(String command) {
HashMap<String, CWGroup> groups = configCache.getGroupList();
for (CWGroup group : groups.values()) {
if (group.getCommands().contains(command)) {
if (group.getCommandDeniedMessage() == null || group.getCommandDeniedMessage().equals("")) continue;
if (group.getCommandDeniedMessage() == null || group.getCommandDeniedMessage().isEmpty()) continue;
commandDeniedMessage = group.getCommandDeniedMessage();
break; // get first message we find
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static String getCommandDeniedMessage(String command) {
HashMap<String, CWGroup> groups = configCache.getGroupList();
for (CWGroup group : groups.values()) {
if (group.getCommands().contains(command)) {
if (group.getCommandDeniedMessage() == null || group.getCommandDeniedMessage().equals("")) continue;
if (group.getCommandDeniedMessage() == null || group.getCommandDeniedMessage().isEmpty()) continue;
commandDeniedMessage = group.getCommandDeniedMessage();
break; // get first message we find
}
Expand Down

0 comments on commit a91af74

Please sign in to comment.