--- jsr166/src/jsr166y/LinkedTransferQueue.java 2009/10/27 23:59:38 1.55 +++ jsr166/src/jsr166y/LinkedTransferQueue.java 2009/10/28 00:14:03 1.56 @@ -479,6 +479,12 @@ public class LinkedTransferQueue exte private static final int SYNC = 2; // for transfer, take private static final int TIMEOUT = 3; // for timed poll, tryTransfer + @SuppressWarnings("unchecked") + static E cast(Object item) { + assert item == null || item.getClass() != Node.class; + return (E) item; + } + /** * Implements all queuing methods. See above for explanation. * @@ -683,12 +689,6 @@ public class LinkedTransferQueue exte return null; } - @SuppressWarnings("unchecked") - static E cast(Object item) { - assert item.getClass() != Node.class; - return (E) item; - } - /** * Returns the item in the first unmatched node with isData; or * null if none. Used by peek.