# | Line 261 | Line 261 | public class CopyOnWriteArrayList<E> | |
---|---|---|
261 | */ | |
262 | public Object clone() { | |
263 | try { | |
264 | < | CopyOnWriteArrayList<E> c = (CopyOnWriteArrayList<E>) super.clone(); |
265 | < | c.resetLock(); |
266 | < | return c; |
264 | > | @SuppressWarnings("unchecked") |
265 | > | CopyOnWriteArrayList<E> clone = |
266 | > | (CopyOnWriteArrayList<E>) super.clone(); |
267 | > | clone.resetLock(); |
268 | > | return clone; |
269 | } catch (CloneNotSupportedException e) { | |
270 | // this shouldn't happen, since we are Cloneable | |
271 | throw new InternalError(); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |