ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166y/LinkedTransferQueue.java
(Generate patch)

Comparing jsr166/src/jsr166y/LinkedTransferQueue.java (file contents):
Revision 1.55 by jsr166, Tue Oct 27 23:59:38 2009 UTC vs.
Revision 1.56 by jsr166, Wed Oct 28 00:14:03 2009 UTC

# Line 479 | Line 479 | public class LinkedTransferQueue<E> exte
479      private static final int SYNC    = 2; // for transfer, take
480      private static final int TIMEOUT = 3; // for timed poll, tryTransfer
481  
482 +    @SuppressWarnings("unchecked")
483 +    static <E> E cast(Object item) {
484 +        assert item == null || item.getClass() != Node.class;
485 +        return (E) item;
486 +    }
487 +
488      /**
489       * Implements all queuing methods. See above for explanation.
490       *
# Line 683 | Line 689 | public class LinkedTransferQueue<E> exte
689          return null;
690      }
691  
686    @SuppressWarnings("unchecked")
687    static <E> E cast(Object item) {
688        assert item.getClass() != Node.class;
689        return (E) item;
690    }
691
692      /**
693       * Returns the item in the first unmatched node with isData; or
694       * null if none.  Used by peek.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines