jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r791440 - /jackrabbit/branches/1.x/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
Date Mon, 06 Jul 2009 11:08:38 GMT
Author: jukka
Date: Mon Jul  6 11:08:38 2009
New Revision: 791440

URL: http://svn.apache.org/viewvc?rev=791440&view=rev
Log:
1.x: Use SynchronizedBoolean from concurrent.jar instead of the Java 5 AtomicBoolean (JCR-2106)

Modified:
    jackrabbit/branches/1.x/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java

Modified: jackrabbit/branches/1.x/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.x/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java?rev=791440&r1=791439&r2=791440&view=diff
==============================================================================
--- jackrabbit/branches/1.x/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
(original)
+++ jackrabbit/branches/1.x/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
Mon Jul  6 11:08:38 2009
@@ -34,7 +34,7 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
+import EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean;
 
 import javax.jcr.Item;
 import javax.jcr.Node;
@@ -87,7 +87,7 @@
     private final Session[] sessionList;
     private final SessionListener sessionListener;
     
-    private final AtomicBoolean closed = new AtomicBoolean();
+    private final SynchronizedBoolean closed = new SynchronizedBoolean(false);
 
     private boolean persistenceManagerScan;
 
@@ -374,7 +374,7 @@
      * Cleanup resources used internally by this instance.
      */
     public void close() {
-        if (!closed.getAndSet(true)) {
+        if (!closed.set(true)) {
             for (int i = 0; i < sessionList.length; i++) {
                 sessionList[i].logout();
             }



Mime
View raw message