incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [02/14] git commit: Fixing NPE in the Ref dir.
Date Wed, 15 Jan 2014 22:03:49 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/c529affb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/c529affb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/c529affb

Branch: refs/heads/apache-blur-0.2
Commit: c529affb0fd7bb1138b0dbc4c1ebff7180b9aed4
Parents: 2aa01dc
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 13:50:41 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/c529affb/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