Author: toad
Date: 2008-10-29 19:25:12 +0000 (Wed, 29 Oct 2008)
New Revision: 23179

Modified:
   branches/db4o/freenet/src/freenet/keys/ClientCHK.java
Log:
paranoia, throw NPE early


Modified: branches/db4o/freenet/src/freenet/keys/ClientCHK.java
===================================================================
--- branches/db4o/freenet/src/freenet/keys/ClientCHK.java       2008-10-29 
19:24:46 UTC (rev 23178)
+++ branches/db4o/freenet/src/freenet/keys/ClientCHK.java       2008-10-29 
19:25:12 UTC (rev 23179)
@@ -46,6 +46,7 @@
        this.controlDocument = key.controlDocument;
        this.cryptoAlgorithm = key.cryptoAlgorithm;
        this.compressionAlgorithm = key.compressionAlgorithm;
+        if(routingKey == null) throw new NullPointerException();
     }

     /**
@@ -67,6 +68,7 @@
         this.controlDocument = isControlDocument;
         this.cryptoAlgorithm = algo;
         this.compressionAlgorithm = compressionAlgorithm;
+        if(routingKey == null) throw new NullPointerException();
     }

     /**


Reply via email to