-
Bug
-
Resolution: Duplicate
-
P5
-
None
-
1.4.0
-
None
-
generic
-
solaris_8
There is a performance bug in HashMap.putAll. The logic to pre-expand
the array is not correct. The code might cause the array to be
expanded twice instead of once, for example when
threshold = 8
size = 7
t.size() = 15
loadFactor = 1
The correction is to add the line
n += size;
after the lines
if (n == 0)
return;
the array is not correct. The code might cause the array to be
expanded twice instead of once, for example when
threshold = 8
size = 7
t.size() = 15
loadFactor = 1
The correction is to add the line
n += size;
after the lines
if (n == 0)
return;
- duplicates
-
JDK-4710319 HashMap.resize(int) aborts when it shouldn't
-
- Closed
-