Trivial code householding

- Replace `if (!x) ... else ...` with `if(x) ... else ...`
- Avoid throwing RuntimeException; use children
This commit is contained in:
ljacqu
2016-05-30 12:18:55 +02:00
parent 9349993faf
commit 9b1ee86b2f
19 changed files with 77 additions and 82 deletions
+3 -3
View File
@@ -62,10 +62,10 @@ public final class ToolsRunner {
ToolTask task = tasks.get(taskName);
if (task == null) {
System.out.format("Unknown task '%s'%n", taskName);
} else if (!(task instanceof AutoToolTask)) {
System.out.format("Task '%s' cannot be run on command line%n", taskName);
} else {
} else if (task instanceof AutoToolTask) {
((AutoToolTask) task).executeDefault();
} else {
System.out.format("Task '%s' cannot be run on command line%n", taskName);
}
}
}