We have multiple threads calling add(obj) on an ArrayList.
add(obj)
ArrayList
My theory is that when add is called concurrently by two threads,
add
You could use instead of ArrayList(); :
ArrayList();
Collections.synchronizedList( new ArrayList() );
or
new Vector();
synchronizedList as of me preferable because it's:
synchronizedList