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

Comparing jsr166/src/main/java/util/concurrent/LinkedTransferQueue.java (file contents):
Revision 1.9 by jsr166, Wed Oct 28 00:00:38 2009 UTC vs.
Revision 1.10 by jsr166, Wed Oct 28 00:15:07 2009 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines