This bug relates to the observation that the ExplodedImage subclasses of SystemImage:
src/java.base/share/classes/jdk/internal/jrtfs/ExplodedImage.java
Has a visible method `getChildren()` on its implementation of `ImageReader.Node`, which calculates the child nodes on demand.
This method has no syncrhonization and ends up returning the modifiable list (without copying) to the caller, allowing multiple threads to potentially make concurrent modifications to the list (both unwanted and non-thread safe).
While this is an internal only API, it seems like it would be better if the caching was syncrhonized and the returned list were unmodifiable/immutable.
src/java.base/share/classes/jdk/internal/jrtfs/ExplodedImage.java
Has a visible method `getChildren()` on its implementation of `ImageReader.Node`, which calculates the child nodes on demand.
This method has no syncrhonization and ends up returning the modifiable list (without copying) to the caller, allowing multiple threads to potentially make concurrent modifications to the list (both unwanted and non-thread safe).
While this is an internal only API, it seems like it would be better if the caching was syncrhonized and the returned list were unmodifiable/immutable.