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

Comparing jsr166/src/main/java/util/ArrayList.java (file contents):
Revision 1.60 by jsr166, Wed May 16 16:18:00 2018 UTC vs.
Revision 1.66 by jsr166, Thu May 2 14:31:30 2019 UTC

# Line 28 | Line 28 | package java.util;
28   import java.util.function.Consumer;
29   import java.util.function.Predicate;
30   import java.util.function.UnaryOperator;
31 < import jdk.internal.misc.SharedSecrets;
31 > // OPENJDK import jdk.internal.access.SharedSecrets;
32  
33   /**
34   * Resizable-array implementation of the {@code List} interface.  Implements
# Line 92 | Line 92 | import jdk.internal.misc.SharedSecrets;
92   * should be used only to detect bugs.</i>
93   *
94   * <p>This class is a member of the
95 < * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
95 > * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
96   * Java Collections Framework</a>.
97   *
98   * @param <E> the type of elements in this list
# Line 571 | Line 571 | public class ArrayList<E> extends Abstra
571          if (to > es.length) {
572              throw new ConcurrentModificationException();
573          }
574 <        var oit = other.iterator();
574 >        Iterator<?> oit = other.iterator();
575          for (; from < to; from++) {
576              if (!oit.hasNext() || !Objects.equals(es[from], oit.next())) {
577                  return false;
# Line 926 | Line 926 | public class ArrayList<E> extends Abstra
926  
927          if (size > 0) {
928              // like clone(), allocate array based upon size not capacity
929 <            SharedSecrets.getJavaObjectInputStreamAccess().checkArray(s, Object[].class, size);
929 >            jsr166.Platform.checkArray(s, Object[].class, size);
930              Object[] elements = new Object[size];
931  
932              // Read in all elements in the proper order.
# Line 1737 | Line 1737 | public class ArrayList<E> extends Abstra
1737      @Override
1738      public void replaceAll(UnaryOperator<E> operator) {
1739          replaceAllRange(operator, 0, size);
1740 +        // TODO(8203662): remove increment of modCount from ...
1741 +        modCount++;
1742      }
1743  
1744      private void replaceAllRange(UnaryOperator<E> operator, int i, int end) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines