This is an automated email from the ASF dual-hosted git repository.
ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/master by this push:
new 3c2175f CAY-2720 ConcurrentModificationException in the
TypeAwareSQLTreeProcessor
3c2175f is described below
commit 3c2175fc7dd9053ee186f19a38caab5f2292fb63
Author: Nikita Timofeev <[email protected]>
AuthorDate: Wed Sep 8 17:45:47 2021 +0300
CAY-2720 ConcurrentModificationException in the TypeAwareSQLTreeProcessor
---
RELEASE-NOTES.txt | 1 +
.../cayenne/access/sqlbuilder/sqltree/PerAttributeChildProcessor.java | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 95dd696..437f521 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -31,6 +31,7 @@ CAY-2712 Shouldn't run batch inserts with generated keys if
there is reflexive d
CAY-2713 ConcurrentModificationException when Inserting
CAY-2714 Offset value is not copied to column select metadata
CAY-2716 Wrong operator for the bitwise NOT
+CAY-2720 ConcurrentModificationException in the TypeAwareSQLTreeProcessor
----------------------------------
Release: 4.2.M3
diff --git
a/cayenne-server/src/main/java/org/apache/cayenne/access/sqlbuilder/sqltree/PerAttributeChildProcessor.java
b/cayenne-server/src/main/java/org/apache/cayenne/access/sqlbuilder/sqltree/PerAttributeChildProcessor.java
index 3ecf5c5..85aaeb1 100644
---
a/cayenne-server/src/main/java/org/apache/cayenne/access/sqlbuilder/sqltree/PerAttributeChildProcessor.java
+++
b/cayenne-server/src/main/java/org/apache/cayenne/access/sqlbuilder/sqltree/PerAttributeChildProcessor.java
@@ -19,9 +19,9 @@
package org.apache.cayenne.access.sqlbuilder.sqltree;
-import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import org.apache.cayenne.map.DbAttribute;
@@ -32,7 +32,7 @@ import org.apache.cayenne.map.DbAttribute;
*/
public class PerAttributeChildProcessor<T extends Node> implements
ChildProcessor<T> {
- private final Map<DbAttribute, ChildProcessor<T>> processorByAttribute =
new HashMap<>();
+ private final Map<DbAttribute, ChildProcessor<T>> processorByAttribute =
new ConcurrentHashMap<>();
private final Function<T, DbAttribute> attributeMapper;
private final Function<DbAttribute, ChildProcessor<T>> processorFactory;