jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r483380 - in /jackrabbit/trunk/jackrabbit-jcr-server: pom.xml src/main/java/org/apache/jackrabbit/webdav/jcr/transaction/TxLockManagerImpl.java
Date Thu, 07 Dec 2006 08:47:41 GMT
Author: mreutegg
Date: Thu Dec  7 00:47:40 2006
New Revision: 483380

URL: http://svn.apache.org/viewvc?view=rev&rev=483380
Log:
Remove dependency to commons-collection

Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/pom.xml
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/transaction/TxLockManagerImpl.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/pom.xml?view=diff&rev=483380&r1=483379&r2=483380
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/pom.xml Thu Dec  7 00:47:40 2006
@@ -79,11 +79,6 @@
       <version>1.0</version>
     </dependency>
     <dependency>
-      <groupId>commons-collections</groupId>
-      <artifactId>commons-collections</artifactId>
-      <version>3.1</version>
-    </dependency>
-    <dependency>
       <groupId>xerces</groupId>
       <artifactId>xercesImpl</artifactId>
       <version>2.6.2</version>

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/transaction/TxLockManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/transaction/TxLockManagerImpl.java?view=diff&rev=483380&r1=483379&r2=483380
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/transaction/TxLockManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/transaction/TxLockManagerImpl.java
Thu Dec  7 00:47:40 2006
@@ -35,7 +35,6 @@
 import org.apache.jackrabbit.webdav.transaction.TransactionResource;
 import org.apache.jackrabbit.webdav.transaction.TxActiveLock;
 import org.apache.jackrabbit.webdav.transaction.TxLockManager;
-import org.apache.commons.collections.set.MapBackedSet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -48,8 +47,8 @@
 import javax.transaction.xa.Xid;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.Set;
 import java.util.IdentityHashMap;
+import java.util.Map;
 
 /**
  * <code>TxLockManagerImpl</code> manages locks with locktype
@@ -70,7 +69,7 @@
 
     private TransactionMap map = new TransactionMap();
 
-    private Set listeners = MapBackedSet.decorate(new IdentityHashMap());
+    private Map listeners = new IdentityHashMap();
 
     /**
      * Create a new lock.
@@ -219,7 +218,7 @@
             if (lockInfo.isCommit()) {
                 TransactionListener[] txListeners;
                 synchronized (listeners) {
-                    txListeners = (TransactionListener[]) listeners.toArray(new TransactionListener[0]);
+                    txListeners = (TransactionListener[]) listeners.values().toArray(new
TransactionListener[0]);
                 }
                 for (int i = 0; i < txListeners.length; i++) {
                     txListeners[i].beforeCommit(resource, lockToken);
@@ -304,7 +303,7 @@
      */
     public void addTransactionListener(TransactionListener listener) {
         synchronized (listeners) {
-            listeners.add(listener);
+            listeners.put(listener, listener);
         }
     }
 



Mime
View raw message