incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [16/28] git commit: Fixing NPE in the Ref dir.
Date Wed, 15 Jan 2014 22:03:39 GMT
Fixing NPE in the Ref dir.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/20a63d58
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/20a63d58
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/20a63d58

Branch: refs/heads/master
Commit: 20a63d58f1c5f53a585a43c433184fa43ff1ac8d
Parents: 8174208
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Wed Jan 15 13:50:41 2014 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Jan 15 17:02:44 2014 -0500

----------------------------------------------------------------------
 .../blur/lucene/store/refcounter/DirectoryReferenceFileGC.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/20a63d58/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceFileGC.java
----------------------------------------------------------------------
diff --git a/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceFileGC.java
b/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceFileGC.java
index 4407e9d..6522d6a 100644
--- a/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceFileGC.java
+++ b/blur-store/src/main/java/org/apache/blur/lucene/store/refcounter/DirectoryReferenceFileGC.java
@@ -58,7 +58,7 @@ public class DirectoryReferenceFileGC extends TimerTask implements Closeable
{
 
     public boolean tryToDelete() throws IOException {
       AtomicInteger counter = refs.get(name);
-      if (counter.get() <= 0) {
+      if (counter == null || counter.get() <= 0) {
         refs.remove(name);
         LOG.debug("Removing file [{0}]", name);
         directory.deleteFile(name);


Mime
View raw message