Community
Participate
Working Groups
I20040407 If 2 threads run JavaCore#setClasspathContainer(...) concurrently, one thread can think that a container is being initialized while it is the other thread that initializes it. This is because a global map is used to store the container values (which is fine) but to also remember that the initialization is in progress.
Same issue with classpath variable initialization.
Moved the maps to instance fields, added new maps (variableInitializationInProgress and containerInitializationInProgress) to hold on the 'initialization in progress' and synchronized the methods variableGet(...), variablePut(...), containerGet(...) and containerPut(...)
Verified for 3.0 M9 with build I200405180816.