-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
9, 10, 11
-
b59
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
Nested calls to computeIfAbsent result in ConcurrentModificationException
REGRESSION : Last worked in version 8u172
---------- BEGIN SOURCE ----------
public static void main(String[] args) {
// dep2 depends on dep1
Map<String, String> cache = new HashMap<>();
cache.computeIfAbsent("dep2", ignored -> {
cache.computeIfAbsent("dep1", ignored2 -> "dep1_value");
return "dep2_value";
});
System.out.println(cache.get("dep1"));
System.out.println(cache.get("dep2"));
}
---------- END SOURCE ----------
FREQUENCY : always
Nested calls to computeIfAbsent result in ConcurrentModificationException
REGRESSION : Last worked in version 8u172
---------- BEGIN SOURCE ----------
public static void main(String[] args) {
// dep2 depends on dep1
Map<String, String> cache = new HashMap<>();
cache.computeIfAbsent("dep2", ignored -> {
cache.computeIfAbsent("dep1", ignored2 -> "dep1_value");
return "dep2_value";
});
System.out.println(cache.get("dep1"));
System.out.println(cache.get("dep2"));
}
---------- END SOURCE ----------
FREQUENCY : always