Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2206918 | 7 | Joe Wang | P3 | Closed | Fixed | b134 |
FULL PRODUCT VERSION :
jdk1.6.0_14
A DESCRIPTION OF THE PROBLEM :
com.sun.org.apache.bcel.internal.Constants.ArrayType implments equals() and hashcode() but NOT hashCode().
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
look at the code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
hashcode() should be hashCode()
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/** @return a hash code value for the object.
*/
public int hashcode() { return basic_type.hashCode() ^ dimensions; }
/** @return true if both type objects refer to the same array type.
*/
public boolean equals(Object type) {
if(type instanceof ArrayType) {
ArrayType array = (ArrayType)type;
return (array.dimensions == dimensions) && array.basic_type.equals(basic_type);
} else
return false;
}
---------- END SOURCE ----------
jdk1.6.0_14
A DESCRIPTION OF THE PROBLEM :
com.sun.org.apache.bcel.internal.Constants.ArrayType implments equals() and hashcode() but NOT hashCode().
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
look at the code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
hashcode() should be hashCode()
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/** @return a hash code value for the object.
*/
public int hashcode() { return basic_type.hashCode() ^ dimensions; }
/** @return true if both type objects refer to the same array type.
*/
public boolean equals(Object type) {
if(type instanceof ArrayType) {
ArrayType array = (ArrayType)type;
return (array.dimensions == dimensions) && array.basic_type.equals(basic_type);
} else
return false;
}
---------- END SOURCE ----------
- backported by
-
JDK-2206918 com.sun.org.apache.bcel.internal.Constants.ArrayType missing hashCode()
-
- Closed
-