There's a data race in the following code in VersionHelper:
if (nameToVersion.containsKey(name)) {
if (!version.equals(nameToVersion.get(name))) {
throw new MultiReleaseException(
"err.multirelease.version.associated",
name, nameToVersion.get(name), version
);
}
} else {
nameToVersion.put(name, version);
}
2 threads might be running this code concurrently. Both threads could first run the nameToVersion.containsKey(name) check, see false as the result, and then both continue to the else block to put the result in the nameToVersion map, where 1 of the 2 threads will end up overwriting the value the other thread inserted.