Author: toad
Date: 2008-07-18 21:22:12 +0000 (Fri, 18 Jul 2008)
New Revision: 21223

Modified:
   
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java
Log:
Paranoia

Modified: 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java  
    2008-07-18 21:21:34 UTC (rev 21222)
+++ 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java  
    2008-07-18 21:22:12 UTC (rev 21223)
@@ -314,11 +314,15 @@
                                container.activate(key, 5);
                                container.activate(ckey, 5);
                                container.activate(req.getClientRequest(), 1);
+                               if(key != null && key.getRoutingKey() == null)
+                                       throw new NullPointerException();
                                ret = new PersistentChosenRequest(this, req, 
token, key, ckey, req.getPriorityClass(container));
                                container.set(ret);
                                if(logMINOR)
                                        Logger.minor(this, "Storing "+ret+" for 
"+req);
                        } else {
+                               if(key != null && key.getRoutingKey() == null)
+                                       throw new NullPointerException();
                                ret = new ChosenRequest(req, token, key, ckey, 
req.getPriorityClass(container));
                        }
                        return ret;


Reply via email to