RFR: 8048207 : (xs) Collections.checkedQueue offer() calls add() on wrapped queue
Hello all; This changeset corrects an issue with the Collections.checkedQueue() utility method added in Java 8. The wrapper implementation incorrectly calls add() on the wrapped queue rather than offer(). I improved the existing unit test to include this condition (and converted it to TestNG). I also converted a few uses of Collections.CheckedCollection.typeCheck to use the returned properly typed result where previously the callers had been using it as a standalone check. jbsbug: https://bugs.openjdk.java.net/browse/JDK-8048207 webrev: http://cr.openjdk.java.net/~mduigou/JDK-8048207/0/webrev/ Mike
On Jun 27, 2014, at 1:58 AM, Mike Duigou <mike.duigou@oracle.com> wrote:
Hello all;
This changeset corrects an issue with the Collections.checkedQueue() utility method added in Java 8. The wrapper implementation incorrectly calls add() on the wrapped queue rather than offer().
I improved the existing unit test to include this condition (and converted it to TestNG). I also converted a few uses of Collections.CheckedCollection.typeCheck to use the returned properly typed result where previously the callers had been using it as a standalone check.
jbsbug: https://bugs.openjdk.java.net/browse/JDK-8048207 webrev: http://cr.openjdk.java.net/~mduigou/JDK-8048207/0/webrev/
+1 Paul.
participants (2)
-
Mike Duigou
-
Paul Sandoz