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.53 by jsr166, Mon Jul 3 20:08:10 2017 UTC vs.
Revision 1.54 by jsr166, Sun Oct 22 17:44:03 2017 UTC

# Line 1 | Line 1
1   /*
2 < * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
2 > * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
3   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4   *
5   * This code is free software; you can redistribute it and/or modify it
# 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;
32  
33   /**
34   * Resizable-array implementation of the {@code List} interface.  Implements
# Line 820 | Line 821 | public class ArrayList<E> extends Abstra
821  
822          if (size > 0) {
823              // like clone(), allocate array based upon size not capacity
824 +            SharedSecrets.getJavaObjectInputStreamAccess().checkArray(s, Object[].class, size);
825              Object[] elements = new Object[size];
826  
827              // Read in all elements in the proper order.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines