jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1414733 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitSetENTCacheImpl.java
Date Wed, 28 Nov 2012 14:45:26 GMT
Author: stefan
Date: Wed Nov 28 14:45:25 2012
New Revision: 1414733

URL: http://svn.apache.org/viewvc?rev=1414733&view=rev
Log:
JCR-3468: ConcurrentModificationException in BitSetENTCacheImpl

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitSetENTCacheImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitSetENTCacheImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitSetENTCacheImpl.java?rev=1414733&r1=1414732&r2=1414733&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitSetENTCacheImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitSetENTCacheImpl.java
Wed Nov 28 14:45:25 2012
@@ -109,7 +109,9 @@ public class BitSetENTCacheImpl implemen
         if (contains(key)) {
             return key;
         }
-        Iterator<Key> iter = sortedKeys.iterator();
+        // clone TreeSet first to prevent ConcurrentModificationException
+        TreeSet<Key> keys = (TreeSet<Key>) sortedKeys.clone();
+        Iterator<Key> iter = keys.iterator();
         while (iter.hasNext()) {
             Key k = iter.next();
             if (key.contains(k)) {



Mime
View raw message