Author: j16sdiz
Date: 2008-07-09 08:40:49 +0000 (Wed, 09 Jul 2008)
New Revision: 21002

Modified:
   
branches/saltedhashstore/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
Log:
fix NPE on digested key collision

Modified: 
branches/saltedhashstore/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
===================================================================
--- 
branches/saltedhashstore/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
   2008-07-09 08:40:25 UTC (rev 21001)
+++ 
branches/saltedhashstore/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
   2008-07-09 08:40:49 UTC (rev 21002)
@@ -157,6 +157,10 @@

                                try {
                                        StorableBlock block = 
entry.getStorableBlock(routingKey, fullKey);
+                                       if (block == null) {
+                                               misses.incrementAndGet();
+                                               return null;
+                                       }
                                        hits.incrementAndGet();
                                        return block;
                                } catch (KeyVerifyException e) {


Reply via email to