openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r1420321 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/PredicateImpl.java
Date Tue, 11 Dec 2012 18:22:16 GMT
Author: ppoddar
Date: Tue Dec 11 18:22:15 2012
New Revision: 1420321

URL: http://svn.apache.org/viewvc?rev=1420321&view=rev
Log:
OPENJPA-2304: Protect the expressin list for concurrent access

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/PredicateImpl.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/PredicateImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/PredicateImpl.java?rev=1420321&r1=1420320&r2=1420321&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/PredicateImpl.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/PredicateImpl.java
Tue Dec 11 18:22:15 2012
@@ -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 Exp
     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.
      */



Mime
View raw message