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 <[email protected]> Authored: Wed Jan 15 13:50:41 2014 -0500 Committer: Aaron McCurry <[email protected]> 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);
