Darryl, CheckedQueue.offer should call 'this.queue.offer' instead of 'this.add'. If you pass a Queue with bounded capacity (ArrayBlockingQueue) the CQ.offer method should return false when the queue is full but will instead throw an IllegalStateException. The current version also is performing the type check twice. Jason Changeset: c5c91589b126 Author: mduigou Date: 2011-10-19 14:17 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c5c91589b126
5029031: Add Collections.checkedQueue() Reviewed-by: mduigou Contributed-by: darryl.mocek at oracle.com ! src/share/classes/java/util/Collections.java + test/java/util/Collections/CheckedQueue.java