Author: toad
Date: 2009-03-06 22:24:40 +0000 (Fri, 06 Mar 2009)
New Revision: 25907

Modified:
   branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
Log:
Don't over-store the subSegments array. Clone failureException before throwing 
it, so that we can delete it without consequences for the catcher.


Modified: 
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java 
2009-03-06 22:22:49 UTC (rev 25906)
+++ branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java 
2009-03-06 22:24:40 UTC (rev 25907)
@@ -177,7 +177,10 @@
        public synchronized void throwError(ObjectContainer container) throws 
FetchException {
                if(failureException != null) {
                        if(persistent) container.activate(failureException, 5);
-                       throw failureException;
+                       if(persistent)
+                               throw failureException.clone(); // We will 
remove, caller is responsible for clone
+                       else
+                               throw failureException;
                }
        }
        
@@ -983,7 +986,7 @@
                        subSegments.add(sub);
                }
                if(persistent)
-                       container.store(subSegments);
+                       container.ext().store(subSegments, 1);
                return sub;
        }
 

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

Reply via email to