Author: toad
Date: 2008-12-20 21:15:29 +0000 (Sat, 20 Dec 2008)
New Revision: 24688

Modified:
   branches/db4o/freenet/src/freenet/client/async/SingleFileFetcher.java
Log:
Logging, trying to track down weird NPE


Modified: branches/db4o/freenet/src/freenet/client/async/SingleFileFetcher.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleFileFetcher.java       
2008-12-20 21:12:02 UTC (rev 24687)
+++ branches/db4o/freenet/src/freenet/client/async/SingleFileFetcher.java       
2008-12-20 21:15:29 UTC (rev 24688)
@@ -299,7 +299,15 @@
                        container.activate(rcb, 1);
                        container.activate(returnBucket, 5);
                }
-               if(uri == null) throw new NullPointerException(); // paranoia
+               if(uri == null) {
+                       if(container != null) {
+                               if(container.ext().isActive(this))
+                                       throw new NullPointerException("SFI 
"+this+" is active and uri is null!");
+                               else
+                                       throw new NullPointerException("SFI 
"+this+" is not active!");
+                       } else
+                               throw new NullPointerException("uri = null on 
transient SFI?? "+this);
+               }
                synchronized(this) {
                        if(cancelled)
                                return;
@@ -378,6 +386,7 @@
                                                public void gotBucket(Bucket 
data, ObjectContainer container, ClientContext context) {
                                                        if(persistent)
                                                                
container.activate(SingleFileFetcher.this, 1);
+                                                       if(logMINOR) 
Logger.minor(this, "gotBucket on "+SingleFileFetcher.this+" 
persistent="+persistent);
                                                        try {
                                                                metadata = 
Metadata.construct(data);
                                                                
wrapHandleMetadata(true, container, context);

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

Reply via email to