Author: toad
Date: 2008-12-20 17:54:40 +0000 (Sat, 20 Dec 2008)
New Revision: 24686

Modified:
   branches/db4o/freenet/src/freenet/client/async/SingleFileFetcher.java
Log:
Paranoia to find another NPE


Modified: branches/db4o/freenet/src/freenet/client/async/SingleFileFetcher.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleFileFetcher.java       
2008-12-20 17:54:23 UTC (rev 24685)
+++ branches/db4o/freenet/src/freenet/client/async/SingleFileFetcher.java       
2008-12-20 17:54:40 UTC (rev 24686)
@@ -91,6 +91,7 @@
                this.addedMetaStrings = addedMetaStrings;
                this.clientMetadata = (metadata != null ? (ClientMetadata) 
metadata.clone() : new ClientMetadata());
                thisKey = key.getURI();
+               if(origURI == null) throw new NullPointerException();
                this.uri = origURI;
                this.actx = actx;
                this.recursionLevel = recursionLevel + 1;
@@ -127,6 +128,7 @@
                // is compressed, that **doesn't** mean that the data we are 
eventually 
                // going to fetch is!
                this.decompressors = new 
LinkedList<COMPRESSOR_TYPE>(fetcher.decompressors);
+               if(fetcher.uri == null) throw new NullPointerException();
                this.uri = fetcher.uri;
        }
 
@@ -297,6 +299,7 @@
                        container.activate(rcb, 1);
                        container.activate(returnBucket, 5);
                }
+               if(uri == null) throw new NullPointerException(); // paranoia
                synchronized(this) {
                        if(cancelled)
                                return;

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

Reply via email to