jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1167053 - /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
Date Fri, 09 Sep 2011 09:01:19 GMT
Author: thomasm
Date: Fri Sep  9 09:01:19 2011
New Revision: 1167053

URL: http://svn.apache.org/viewvc?rev=1167053&view=rev
Log:
Improved performance for Iterator.remove

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java?rev=1167053&r1=1167052&r2=1167053&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
Fri Sep  9 09:01:19 2011
@@ -165,7 +165,7 @@ public class SubscriptionImpl implements
         path = index == -1
             ? "/"
             : path.substring(index);
-        
+
         return Paths.stringToPath(path);
     }
 
@@ -199,7 +199,7 @@ public class SubscriptionImpl implements
                     return baseRevision;
                 }
             });
-            
+
             waitForCommit.run();
             try {
                 return waitForCommit.get();
@@ -338,7 +338,7 @@ public class SubscriptionImpl implements
         }
 
         private Collection<Event> getEvents(String changes, EventTemplate eventTemplate)
throws RepositoryException {
-            Collection<Event> events = new ArrayList<Event>();
+            Collection<Event> events = new LinkedList<Event>();
             JsopTokenizer jsopTokenizer = new JsopTokenizer(changes);
 
             while (jsopTokenizer.read() != JsopTokenizer.END) {
@@ -360,7 +360,7 @@ public class SubscriptionImpl implements
             NodeId parentId = path.denotesRoot()
                 ? null
                 : createNodeId(getParent(path));
-            
+
             addItem(jsopTokenizer, eventTemplate, events, path, parentId);
         }
 
@@ -383,7 +383,7 @@ public class SubscriptionImpl implements
             }
             else {
                 if (jsopTokenizer.getTokenType() == '[') {
-                    // skip over array 
+                    // skip over array
                     while(jsopTokenizer.read() != ']') {}
                 }
 
@@ -460,7 +460,7 @@ public class SubscriptionImpl implements
 
         private void moveNode(JsopTokenizer jsopTokenizer, EventTemplate eventTemplate, Collection<Event>
events)
                 throws RepositoryException {
-            
+
             Path fromPath = readPath(jsopTokenizer);
             jsopTokenizer.read(':');
             Path toPath = readPath(jsopTokenizer);



Mime
View raw message