< prev index next >
src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java
Print this page
rev 12533 : 8174109: Better queuing priorities
Reviewed-by: smarks
*** 48,57 ****
--- 48,58 ----
import java.util.Spliterators;
import java.util.concurrent.locks.ReentrantLock;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.UnaryOperator;
+ import sun.misc.SharedSecrets;
/**
* A thread-safe variant of {@link java.util.ArrayList} in which all mutative
* operations ({@code add}, {@code set}, and so on) are implemented by
* making a fresh copy of the underlying array.
*** 987,996 ****
--- 988,998 ----
// bind to new lock
resetLock();
// Read in array length and allocate array
int len = s.readInt();
+ SharedSecrets.getJavaOISAccess().checkArray(s, Object[].class, len);
Object[] elements = new Object[len];
// Read in all elements in the proper order.
for (int i = 0; i < len; i++)
elements[i] = s.readObject();
< prev index next >