Replace some String.length() checks with String.isEmpty()

Closes gh-10451
This commit is contained in:
dreis2211
2017-09-28 22:51:07 +02:00
committed by Stephane Nicoll
parent b08e51f0b3
commit 756398b52c
13 changed files with 15 additions and 15 deletions

View File

@@ -117,7 +117,7 @@ class ResourceMatcher {
value = value.substring(1);
minus.add(value);
}
else if (value.trim().length() > 0) {
else if (!value.trim().isEmpty()) {
result.add(value);
}
}

View File

@@ -57,7 +57,7 @@ public class HintCommand extends AbstractCommand {
if (index == 0) {
showCommandHints(starting);
}
else if (!arguments.isEmpty() && (starting.length() > 0)) {
else if (!arguments.isEmpty() && !starting.isEmpty()) {
String command = arguments.remove(0);
showCommandOptionHints(command, Collections.unmodifiableList(arguments),
starting);