jkf 2005/01/11 15:09:36 Modified: src/main/org/apache/tools/zip ZipEntry.java Log: PR: 33049 A zip entry is not equal to another zip entry when the name matches. Multiple files may have the same name, and have for instance different offsets. Revision Changes Path 1.24 +9 -7 ant/src/main/org/apache/tools/zip/ZipEntry.java Index: ZipEntry.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/zip/ZipEntry.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- ZipEntry.java 7 Jan 2005 13:21:01 -0000 1.23 +++ ZipEntry.java 11 Jan 2005 23:09:36 -0000 1.24 @@ -400,30 +400,32 @@ this.name = name; } - /** + /* Two zipentries are not necessarily equal if they have the same name. */ + /* * Get the hashCode of the entry. * This uses the name as the hashcode. * @return a hashcode. * @since Ant 1.7 */ - public int hashCode() { +/* public int hashCode() { return getName().hashCode(); } - - /** +*/ + /* * The equality method. + * @param o the object to compare to * @return true if this object has the same name as <code>o</code> * @since Ant 1.7 */ - public boolean equals(Object o) { +/* public boolean equals(Object o) { if (o instanceof ZipEntry) { ZipEntry other = (ZipEntry) o; return other.getName().equals(getName()); } return false; } - +*/ /** * Helper for JDK 1.1 *
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]