diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/PredicateImpl.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/PredicateImpl.java index 654ba5067..08eaebbe6 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/PredicateImpl.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/PredicateImpl.java @@ -19,6 +19,7 @@ package org.apache.openjpa.persistence.criteria; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; @@ -48,10 +49,10 @@ abstract class PredicateImpl extends ExpressionImpl implements Predicat public static final Predicate TRUE = new Expressions.Equal(ONE,ONE); public static final Predicate FALSE = new Expressions.NotEqual(ONE,ONE); - protected final List _exps = new ArrayList(); + protected final List _exps = Collections.synchronizedList(new ArrayList()); private final BooleanOperator _op; private boolean _negated = false; - + /** * An AND predicate with no arguments. */