-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b78
-
generic
-
generic
-
Verified
The Collection constructors taking a Collection were not thread-safe.
Vector and ArrayList were fixed by
6355660: (coll) Vector(Collection) constructor is not thread safe
6347106: (coll) Make ArrayList(Collection) more threadsafe
but PriorityQueue (and indirectly PriorityBlockingQueue) remain.
The fix is more involved because providing thread-safety without loss of
performance requires switching from 1-based to 0-based arrays internally.
This should be done anyways. There is no reason to waste the initial
element of the internal backing array.
Vector and ArrayList were fixed by
6355660: (coll) Vector(Collection) constructor is not thread safe
6347106: (coll) Make ArrayList(Collection) more threadsafe
but PriorityQueue (and indirectly PriorityBlockingQueue) remain.
The fix is more involved because providing thread-safety without loss of
performance requires switching from 1-based to 0-based arrays internally.
This should be done anyways. There is no reason to waste the initial
element of the internal backing array.
- relates to
-
JDK-6355660 (coll) Vector(Collection) constructor is not thread safe
-
- Resolved
-
-
JDK-6370431 (coll) PriorityQueue.fixUp() use >> instead of >>>
-
- Resolved
-
-
JDK-6347106 (coll) Make ArrayList(Collection) more threadsafe
-
- Closed
-