Author: toad
Date: 2009-03-17 23:18:47 +0000 (Tue, 17 Mar 2009)
New Revision: 26070

Modified:
   branches/db4o/freenet/src/freenet/keys/ClientCHK.java
Log:
More paranoia


Modified: branches/db4o/freenet/src/freenet/keys/ClientCHK.java
===================================================================
--- branches/db4o/freenet/src/freenet/keys/ClientCHK.java       2009-03-17 
23:18:10 UTC (rev 26069)
+++ branches/db4o/freenet/src/freenet/keys/ClientCHK.java       2009-03-17 
23:18:47 UTC (rev 26070)
@@ -216,4 +216,12 @@
        public byte[] getRoutingKey() {
                return routingKey;
        }
+       
+       public boolean objectCanNew(ObjectContainer container) {
+               if(routingKey == null)
+                       throw new NullPointerException("Storing a ClientCHK 
with no routingKey!: stored="+container.ext().isStored(this)+" 
active="+container.ext().isActive(this));
+               if(cryptoKey == null)
+                       throw new NullPointerException("Storing a ClientCHK 
with no cryptoKey!");
+               return true;
+       }
 }

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to