Replace some String.length() checks with String.isEmpty()
Closes gh-10451
This commit is contained in:
committed by
Stephane Nicoll
parent
b08e51f0b3
commit
756398b52c
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user