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

Comparing jsr166/src/main/java/util/ArrayDeque.java (file contents):
Revision 1.65 by jsr166, Sat Feb 28 20:35:47 2015 UTC vs.
Revision 1.67 by jsr166, Thu Sep 10 00:05:48 2015 UTC

# Line 247 | Line 247 | public class ArrayDeque<E> extends Abstr
247      }
248  
249      public E pollFirst() {
250 <        int h = head;
250 >        final Object[] elements = this.elements;
251 >        final int h = head;
252          @SuppressWarnings("unchecked")
253          E result = (E) elements[h];
254          // Element is null if deque empty
# Line 259 | Line 260 | public class ArrayDeque<E> extends Abstr
260      }
261  
262      public E pollLast() {
263 <        int t = (tail - 1) & (elements.length - 1);
263 >        final Object[] elements = this.elements;
264 >        final int t = (tail - 1) & (elements.length - 1);
265          @SuppressWarnings("unchecked")
266          E result = (E) elements[t];
267          if (result != null) {
# Line 846 | Line 848 | public class ArrayDeque<E> extends Abstr
848      }
849  
850      public Spliterator<E> spliterator() {
851 <        return new DeqSpliterator<E>(this, -1, -1);
851 >        return new DeqSpliterator<>(this, -1, -1);
852      }
853  
854      static final class DeqSpliterator<E> implements Spliterator<E> {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines