-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
6
A DESCRIPTION OF THE REQUEST :
java.util.Collections contains methods checkedFOO, synchronizedFOO(), and unmodifiableFOO() for FOO in { Collection, List, Map, ...}. With Java 6 / JDK 1.6 new collections interfaces java.util.Deque and java.util.Queue were added, but java.util.Collections does not yet provide helper methods for those new interfaces.
JUSTIFICATION :
For the same reason that there exists e.g. synchronizedList() (e.g. for request queues in a multi-threaded application), there should be synchronizedDeque() etc.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Analogous to helper methods for existing collections intefaces.
CUSTOMER SUBMITTED WORKAROUND :
Can use synchronizedCollection(), unmodifiableCollection() for some applications, but methods specific to the Queue and Deque interfaces cannot be called.
java.util.Collections contains methods checkedFOO, synchronizedFOO(), and unmodifiableFOO() for FOO in { Collection, List, Map, ...}. With Java 6 / JDK 1.6 new collections interfaces java.util.Deque and java.util.Queue were added, but java.util.Collections does not yet provide helper methods for those new interfaces.
JUSTIFICATION :
For the same reason that there exists e.g. synchronizedList() (e.g. for request queues in a multi-threaded application), there should be synchronizedDeque() etc.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Analogous to helper methods for existing collections intefaces.
CUSTOMER SUBMITTED WORKAROUND :
Can use synchronizedCollection(), unmodifiableCollection() for some applications, but methods specific to the Queue and Deque interfaces cannot be called.
- relates to
-
JDK-5030930 JDK1.5 The method Collections.unmodifiableQueue(Queue<? extends T>) is missing
-
- Closed
-