Browse Source

remove equals/hashcode from Target. Bugzilla report 40207.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@439055 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 19 years ago
parent
commit
24d5b48eeb
2 changed files with 2 additions and 24 deletions
  1. +2
    -0
      WHATSNEW
  2. +0
    -24
      src/main/org/apache/tools/ant/Target.java

+ 2
- 0
WHATSNEW View File

@@ -8,6 +8,8 @@ Fixed bugs:
-----------

* <zip filesonly="true"> included empty directories. Bugzilla report 40258.
* Invalid hash code of Target causes XmlLogger to fail.
Bugzilla report 40207.

Other changes:
--------------


+ 0
- 24
src/main/org/apache/tools/ant/Target.java View File

@@ -454,28 +454,4 @@ public class Target implements TaskContainer {
String test = project.replaceProperties(unlessCondition);
return project.getProperty(test) == null;
}

/**
* Equality check is based on target name
* @param that other thing to check
* @return true iff type and name are equal
*/
public boolean equals(Object that) {
if (this == that) return true;
if (that == null || getClass() != that.getClass()) return false;

final Target target = (Target) that;

if (name != null ? !name.equals(target.name) : target.name != null) return false;

return true;
}

/**
* Hash code is based on name, is 0 if the name==null
* @return hash code
*/
public int hashCode() {
return (name != null ? name.hashCode() : 0);
}
}

Loading…
Cancel
Save