OPENJPA-2304: Protect the expressin list for concurrent access

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1420321 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2012-12-11 18:22:15 +00:00
parent 88cc847a1c
commit f17a08fee4
1 changed files with 3 additions and 2 deletions

View File

@ -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<Boolean> 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<Predicate> _exps = new ArrayList<Predicate>();
protected final List<Predicate> _exps = Collections.synchronizedList(new ArrayList<Predicate>());
private final BooleanOperator _op;
private boolean _negated = false;
/**
* An AND predicate with no arguments.
*/