jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r890054 - in /jackrabbit/trunk/jackrabbit-core/src: main/java/org/apache/jackrabbit/core/util/CooperativeFileLock.java test/java/org/apache/jackrabbit/core/util/CooperativeFileLockTest.java
Date Sun, 13 Dec 2009 12:09:35 GMT
Author: thomasm
Date: Sun Dec 13 12:09:35 2009
New Revision: 890054

URL: http://svn.apache.org/viewvc?rev=890054&view=rev
Log:
JCR-2431 CooperativeFileLock improvements (fix test case)

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/CooperativeFileLock.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/util/CooperativeFileLockTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/CooperativeFileLock.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/CooperativeFileLock.java?rev=890054&r1=890053&r2=890054&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/CooperativeFileLock.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/CooperativeFileLock.java
Sun Dec 13 12:09:35 2009
@@ -92,6 +92,7 @@
             return;
         }
         try {
+            stop = true;
             if (fileName != null) {
                 if (load().equals(properties)) {
                     delete(fileName);
@@ -100,7 +101,6 @@
         } catch (Exception e) {
             LOG.warn("Error unlocking " + fileName, e);
         } finally {
-            stop = true;
             locked = false;
         }
         try {

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/util/CooperativeFileLockTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/util/CooperativeFileLockTest.java?rev=890054&r1=890053&r2=890054&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/util/CooperativeFileLockTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/util/CooperativeFileLockTest.java
Sun Dec 13 12:09:35 2009
@@ -37,7 +37,7 @@
     }
 
     public void setUp() throws IOException {
-        FileUtils.deleteDirectory(new File(TEST_DIRECTORY));
+        FileUtils.deleteQuietly(new File(TEST_DIRECTORY));
     }
 
     public void testFileLock() throws RepositoryException {



Mime
View raw message