Browse Source

invert String equals tests

master
Matt Benson 8 years ago
parent
commit
5c564d9aa5
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/main/org/apache/tools/ant/types/Path.java

+ 4
- 4
src/main/org/apache/tools/ant/types/Path.java View File

@@ -562,22 +562,22 @@ public class Path extends DataType implements Cloneable, ResourceCollection {
if (o != null) {
order = o;
}
if (order.equals("only")) {
if ("only".equals(order)) {
// only: the developer knows what (s)he is doing
result.addExisting(p, true);

} else if (order.equals("first")) {
} else if ("first".equals(order)) {
// first: developer could use a little help
result.addExisting(p, true);
result.addExisting(this);

} else if (order.equals("ignore")) {
} else if ("ignore".equals(order)) {
// ignore: don't trust anyone
result.addExisting(this);

} else {
// last: don't trust the developer
if (!order.equals("last")) {
if (!"last".equals(order)) {
log("invalid value for " + MagicNames.BUILD_SYSCLASSPATH
+ ": " + order,
Project.MSG_WARN);


Loading…
Cancel
Save