-
Bug
-
Resolution: Fixed
-
P3
-
7-pool, 8
-
b63
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8018999 | 7u45 | Neil Richards | P3 | Closed | Fixed | b01 |
JDK-8000956 | 7u40 | Unassigned | P3 | Closed | Fixed | b01 |
Neil Richards <neil.richards@ngmr.net> reports:
I notice that the behaviour of java.util.Hashtable.Entry.hashCode() no
longer conforms to the defined behaviour (in the Java API Javadoc [1])
for java.util.Map.Entry.hashCode() implementations.
The code in Hashtable.Entry.hashCode() assumes that the value in
Hashtable.Entry.hash will always be the same as that for
Hashtable.Entry.getKey().hashCode() .
However, since Java bug 7126277 (Alternative String hashing
implementation), the use of Hashtable.hashSeed, a randomizing factor,
has been introduced into the calculation of Hashtable.hash().
It is the result from Hashtable.hash() which ends up stored in the
Hashtable.Entry.hash field.
So the assumption made in Hashtable.Entry.hashCode() is no longer valid,
and the code needs to be corrected, so that it once more complies with
the Java API defined behaviour.
I notice that the behaviour of java.util.Hashtable.Entry.hashCode() no
longer conforms to the defined behaviour (in the Java API Javadoc [1])
for java.util.Map.Entry.hashCode() implementations.
The code in Hashtable.Entry.hashCode() assumes that the value in
Hashtable.Entry.hash will always be the same as that for
Hashtable.Entry.getKey().hashCode() .
However, since Java bug 7126277 (Alternative String hashing
implementation), the use of Hashtable.hashSeed, a randomizing factor,
has been introduced into the calculation of Hashtable.hash().
It is the result from Hashtable.hash() which ends up stored in the
Hashtable.Entry.hash field.
So the assumption made in Hashtable.Entry.hashCode() is no longer valid,
and the code needs to be corrected, so that it once more complies with
the Java API defined behaviour.
- backported by
-
JDK-8000956 Hashtable.Entry.hashCode() no longer conforms to Map.Entry.hashCode()
-
- Closed
-
-
JDK-8018999 Hashtable.Entry.hashCode() no longer conforms to Map.Entry.hashCode()
-
- Closed
-