Browse Source

Who'd have guessed that:

boolean xor not boolean
is equivalent to:
 boolean == boolean?

Added a comment as well so Peter will be my friend again!


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277544 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 20 years ago
parent
commit
58e0d44ddf
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/main/org/apache/tools/ant/ComponentHelper.java

+ 2
- 1
src/main/org/apache/tools/ant/ComponentHelper.java View File

@@ -583,7 +583,8 @@ public class ComponentHelper {
private boolean sameDefinition( private boolean sameDefinition(
AntTypeDefinition def, AntTypeDefinition old) { AntTypeDefinition def, AntTypeDefinition old) {
boolean defValid = validDefinition(def); boolean defValid = validDefinition(def);
boolean sameValidity = defValid ^ !validDefinition(old);
boolean sameValidity = (defValid == validDefinition(old));
//must have same validity; then if they are valid they must also be the same:
return sameValidity && (!defValid || def.sameDefinition(old, project)); return sameValidity && (!defValid || def.sameDefinition(old, project));
} }




Loading…
Cancel
Save