Tibor17 commented on pull request #142:
URL: https://github.com/apache/maven-resolver/pull/142#issuecomment-1023218695


   Don't use the old Java Utils model.
   `Collections.synchronizedList( new ArrayList<DependencyNode>( 0 ) )`
   This is still thread-unsafe due to the `ArrayList` is unsafe.
   Every implementatino of `ArrayList` has two variables (int size, Object[]). 
Due to this implementation is not safe and due to the writer thread created the 
object, there is no memorry barrier which would force the thread to write the 
CPU cache to the main memory and thus there is no guarantee that a reader 
thread would safely read these variales as initialized.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to