Can using foreach of CopyOnWriteArrayList cause ConcurrentModificationException in java?

I look to java 11 implementation of .foreach method in CopyOnWriteArrayList public void forEach(Consumer<? super E> action) { Objects.requireNonNull(action); for (Object x : getArray()) { @SuppressWarnings("unchecked") E e = (E) x; action.accept(e); } } I see that it just loops the array without any locks. Can add() or remove() performed concurrently with foreach give a… Read More Can using foreach of CopyOnWriteArrayList cause ConcurrentModificationException in java?