-
Bug
-
Resolution: Done
-
Major
-
3.0.5.Final
-
None
In the method validateBeanNames in org.jboss.weld.bootstrap.ConcurrentValidator, the variable namedAccessibleBeans is a SetMultimap, but not a concurrent one, thus basically a wrapper for HashMap<K, HashSet<V>>.
If the number of keys in the map is higher than the threshold for when the underlying HashMap resizes itself (for instance size=13 for current OpenJDK defaults), calling SetMultimap.get() will cause a resize, as the underlying implementation uses HashMap.computeIfAbsent, which resizes the map if size is above threshold regardless of if the key is absent or not.
This is an issue since in the method this map is used concurrently, iterating over existing keys, thus under the assumption that such a resize will not happen, as it can have weird consequences.
Also see http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-November/056736.html
- relates to
-
RHPAM-2994 Business-central deployment failing with JDK 11
- Closed