lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r813154 - in /lucene/java/trunk/src: java/org/apache/lucene/store/SimpleFSLockFactory.java test/org/apache/lucene/store/TestLockFactory.java
Date Wed, 09 Sep 2009 22:50:25 GMT
Author: markrmiller
Date: Wed Sep  9 22:50:24 2009
New Revision: 813154

URL: http://svn.apache.org/viewvc?rev=813154&view=rev
Log:
LUCENE-1905: fix bug when instantiating SimpleFSLockFacory with a String and add test

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/store/SimpleFSLockFactory.java
    lucene/java/trunk/src/test/org/apache/lucene/store/TestLockFactory.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/store/SimpleFSLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/store/SimpleFSLockFactory.java?rev=813154&r1=813153&r2=813154&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/store/SimpleFSLockFactory.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/store/SimpleFSLockFactory.java Wed Sep  9
22:50:24 2009
@@ -77,8 +77,7 @@
    * @param lockDirName where lock files should be created.
    */
   public SimpleFSLockFactory(String lockDirName) throws IOException {
-    lockDir = new File(lockDirName);
-    setLockDir(lockDir);
+    setLockDir(new File(lockDirName));
   }
 
   public Lock makeLock(String lockName) {

Modified: lucene/java/trunk/src/test/org/apache/lucene/store/TestLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/store/TestLockFactory.java?rev=813154&r1=813153&r2=813154&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/store/TestLockFactory.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/store/TestLockFactory.java Wed Sep  9 22:50:24
2009
@@ -259,6 +259,11 @@
         // Cleanup
         _TestUtil.rmDir(indexDirName);
     }
+    
+    public void testSimpleFSLockFactory() throws IOException {
+      // test string file instantiation
+      new SimpleFSLockFactory("test");
+    }
 
     // Verify: setDisableLocks works
     public void testDisableLocks() throws IOException {



Mime
View raw message