BaseXdb / basex

BaseX Main Repository.
http://basex.org
BSD 3-Clause "New" or "Revised" License
684 stars 265 forks source link

SeqType.mapType: ConcurrentModificationException #2301

Closed ChristianGruen closed 4 months ago

ChristianGruen commented 4 months ago

In #2298, occurrences of AtomType were changed to Type. This triggered a ConcurrentModificationException in the testing environment of an XQuery application:

Stack Trace: java.util.ConcurrentModificationException
 at java.base/java.util.HashMap.computeIfAbsent(Unknown Source)
 at org.basex.query.value.type.SeqType.mapType(SeqType.java:309)
 at org.basex.query.value.type.MapType.get(MapType.java:43)
 at org.basex.query.expr.constr.CMap.optimize(CMap.java:62)
 at org.basex.query.expr.Arr.compile(Arr.java:49)
 at org.basex.query.expr.Arr.compile(Arr.java:48)
 at org.basex.query.expr.Arr.compile(Arr.java:48)
 at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:106)
 at org.basex.query.func.StaticFunc.compile(StaticFunc.java:98)
 at org.basex.query.QueryCompiler.compile(QueryCompiler.java:99)
 at org.basex.query.QueryContext.compile(QueryContext.java:341)

Unfortunately, it is difficult to reproduce the issue.