jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1221706 - in /jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem: NodeListLarge.java NodeListSmall.java
Date Wed, 21 Dec 2011 13:08:27 GMT
Author: thomasm
Date: Wed Dec 21 13:08:26 2011
New Revision: 1221706

URL: http://svn.apache.org/viewvc?rev=1221706&view=rev
Log:
Fix the bloom filter implementation (will be moved to a utility class, and better tested)

Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListLarge.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListLarge.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListLarge.java?rev=1221706&r1=1221705&r2=1221706&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListLarge.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListLarge.java
Wed Dec 21 13:08:26 2011
@@ -194,7 +194,7 @@ public class NodeListLarge implements No
 
         boolean possiblyContains(String name) {
             int h = name.hashCode();
-            int b = nameFilter[(h >> 3) & (nameFilter.length - 1)] & (h &
255);
+            int b = nameFilter[(h >> 3) & (nameFilter.length - 1)] & (1 <<
(h & 7));
             return b != 0;
         }
 

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java?rev=1221706&r1=1221705&r2=1221706&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java
Wed Dec 21 13:08:26 2011
@@ -184,7 +184,7 @@ public class NodeListSmall implements No
         byte[] data = new byte[len];
         for (String n : names) {
             int h = n.hashCode();
-            data[(h >> 3) & (data.length - 1)] |= h & 255;
+            data[(h >> 3) & (data.length - 1)] |= 1 << (h & 7);
         }
         return data;
     }



Mime
View raw message