Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.2.M3
-
None
Description
Seems like TypeAwareSQLTreeProcessor could lead to a ConcurrentModificationException when it lazily computes processors for attributes.
Here's a stack trace:
Caused by: java.util.ConcurrentModificationException: null
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134)
at org.apache.cayenne.access.sqlbuilder.sqltree.PerAttributeChildProcessor.process(PerAttributeChildProcessor.java:48)
at org.apache.cayenne.access.translator.select.TypeAwareSQLTreeProcessor.onChildNodeStart(TypeAwareSQLTreeProcessor.java:88)
at org.apache.cayenne.access.sqlbuilder.sqltree.Node.visit(Node.java:106)
at org.apache.cayenne.access.sqlbuilder.sqltree.Node.visit(Node.java:109)
at org.apache.cayenne.access.translator.select.TypeAwareSQLTreeProcessor.process(TypeAwareSQLTreeProcessor.java:61)
at org.apache.cayenne.access.translator.select.SQLGenerationStage.perform(SQLGenerationStage.java:38)
at org.apache.cayenne.access.translator.select.DefaultSelectTranslator.translate(DefaultSelectTranslator.java:98)
at org.apache.cayenne.access.translator.select.DefaultSelectTranslator.getSql(DefaultSelectTranslator.java:104)
at org.apache.cayenne.access.jdbc.SelectAction.performAction(SelectAction.java:87)
at org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:97)
at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:273)