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

Comparing jsr166/src/main/java/util/Vector.java (file contents):
Revision 1.41 by jsr166, Thu Dec 8 05:01:42 2016 UTC vs.
Revision 1.44 by jsr166, Sat Dec 24 19:32:07 2016 UTC

# Line 1425 | Line 1425 | public class Vector<E>
1425          private int fence; // -1 until used; then one past last index
1426          private int expectedModCount; // initialized when fence set
1427  
1428 <        /** Create new spliterator covering the given range */
1428 >        /** Creates new spliterator covering the given range. */
1429          VectorSpliterator(Object[] array, int origin, int fence,
1430                            int expectedModCount) {
1431              this.array = array;
# Line 1454 | Line 1454 | public class Vector<E>
1454  
1455          @SuppressWarnings("unchecked")
1456          public boolean tryAdvance(Consumer<? super E> action) {
1457 +            Objects.requireNonNull(action);
1458              int i;
1458            if (action == null)
1459                throw new NullPointerException();
1459              if (getFence() > (i = index)) {
1460                  index = i + 1;
1461                  action.accept((E)array[i]);
# Line 1469 | Line 1468 | public class Vector<E>
1468  
1469          @SuppressWarnings("unchecked")
1470          public void forEachRemaining(Consumer<? super E> action) {
1471 <            if (action == null)
1473 <                throw new NullPointerException();
1471 >            Objects.requireNonNull(action);
1472              final int hi = getFence();
1473              final Object[] a = array;
1474              int i;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines