Author: toad
Date: 2008-04-05 13:53:59 +0000 (Sat, 05 Apr 2008)
New Revision: 19029

Modified:
   trunk/freenet/src/freenet/store/RAMFreenetStore.java
Log:
RAMFreenetStore: Throw a KeyCollisionException if the data is different and 
!overwrite.
BDBFS already does this, so we are making RAMFS a better approximation to the 
deployed behaviour.

Modified: trunk/freenet/src/freenet/store/RAMFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/RAMFreenetStore.java        2008-04-05 
13:51:28 UTC (rev 19028)
+++ trunk/freenet/src/freenet/store/RAMFreenetStore.java        2008-04-05 
13:53:59 UTC (rev 19029)
@@ -90,6 +90,8 @@
                                        oldBlock.header = header;
                                        if(storeFullKeys)
                                                oldBlock.fullKey = fullKey;
+                               } else {
+                                       throw new KeyCollisionException();
                                }
                                return;
                        } else {


Reply via email to