-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
8u51
FULL PRODUCT VERSION :
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 7
A DESCRIPTION OF THE PROBLEM :
Description:
Prior to JDK 1.8, putAll() method of HashMap was using public method put() for copying mapping of map as below:
public void putAll(Map<? extends K, ? extends V> m) {
[More...]
for (Map.Entry<? extends K, ? extends V> e : m.entrySet())
put(e.getKey(), e.getValue());
}
But now with the new implementation of HashMap has removed use of put() method and uses putMapEntries() which further uses putval() method in it which are final.
Here the problem is occurring due to the JDK upgrade to 1.8:
As in earlier version putAll() method is using put() method inside it.
Classes which extends java.util.HashMap can override put() method to make a deep copy of a HashMap (as putAll() method was calling it).
This is impacting the project which was build with old release 1.7 and now running with new jdk 1.8
REGRESSION. Last worked in version 8u31
REPRODUCIBILITY :
This bug can be reproduced always.
SUPPORT :
YES
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 7
A DESCRIPTION OF THE PROBLEM :
Description:
Prior to JDK 1.8, putAll() method of HashMap was using public method put() for copying mapping of map as below:
public void putAll(Map<? extends K, ? extends V> m) {
[More...]
for (Map.Entry<? extends K, ? extends V> e : m.entrySet())
put(e.getKey(), e.getValue());
}
But now with the new implementation of HashMap has removed use of put() method and uses putMapEntries() which further uses putval() method in it which are final.
Here the problem is occurring due to the JDK upgrade to 1.8:
As in earlier version putAll() method is using put() method inside it.
Classes which extends java.util.HashMap can override put() method to make a deep copy of a HashMap (as putAll() method was calling it).
This is impacting the project which was build with old release 1.7 and now running with new jdk 1.8
REGRESSION. Last worked in version 8u31
REPRODUCIBILITY :
This bug can be reproduced always.
SUPPORT :
YES