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 |
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 |
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. |