mirror of https://github.com/apache/openjpa.git
OPENJPA-2304: Protect the expressin list for concurrent access - back ported to 2.1.x Pinaki's commit in trunk.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/2.1.x@1423116 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cd0e909732
commit
5095e46e29
|
@ -19,6 +19,7 @@
|
||||||
package org.apache.openjpa.persistence.criteria;
|
package org.apache.openjpa.persistence.criteria;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
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 TRUE = new Expressions.Equal(ONE,ONE);
|
||||||
public static final Predicate FALSE = new Expressions.NotEqual(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 final BooleanOperator _op;
|
||||||
private boolean _negated = false;
|
private boolean _negated = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An AND predicate with no arguments.
|
* An AND predicate with no arguments.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue