Author: j16sdiz
Date: 2008-09-09 14:06:13 +0000 (Tue, 09 Sep 2008)
New Revision: 22576
Modified:
trunk/freenet/src/freenet/support/BloomFilter.java
Log:
proper fix for *.bloom filter not created problem
Modified: trunk/freenet/src/freenet/support/BloomFilter.java
===================================================================
--- trunk/freenet/src/freenet/support/BloomFilter.java 2008-09-09 13:48:53 UTC
(rev 22575)
+++ trunk/freenet/src/freenet/support/BloomFilter.java 2008-09-09 14:06:13 UTC
(rev 22576)
@@ -20,7 +20,7 @@
protected ReadWriteLock lock = new ReentrantReadWriteLock();
public static BloomFilter createFilter(int length, int k, boolean
counting) {
- if (k == 0 || length == 0)
+ if (length == 0)
return new NullBloomFilter(length, k);
if (counting)
return new CountingBloomFilter(length, k);
@@ -29,8 +29,8 @@
}
public static BloomFilter createFilter(File file, int length, int k,
boolean counting) throws IOException {
- //if (k == 0 || length == 0)
- // return new NullBloomFilter(length, k);
+ if (length == 0)
+ return new NullBloomFilter(length, k);
if (counting)
return new CountingBloomFilter(file, length, k);
else