On Tue, Feb 10, 2009 at 8:39 AM, Matthew Toseland <[email protected]> wrote: > On Thursday 05 February 2009 00:26, Daniel Cheng wrote: >> On Thu, Feb 5, 2009 at 3:21 AM, <[email protected]> wrote: >> > Author: toad >> > Date: 2009-02-04 19:21:34 +0000 (Wed, 04 Feb 2009) >> > New Revision: 25554 >> > >> > Modified: >> > > branches/db4o/freenet/src/freenet/client/async/SplitFileInserterSegment.java >> > Log: >> > Doh! Fix isEmpty >> > >> > >> > Modified: > branches/db4o/freenet/src/freenet/client/async/SplitFileInserterSegment.java >> > =================================================================== >> > --- > branches/db4o/freenet/src/freenet/client/async/SplitFileInserterSegment.java > 2009-02-04 19:10:02 UTC (rev 25553) >> > +++ > branches/db4o/freenet/src/freenet/client/async/SplitFileInserterSegment.java > 2009-02-04 19:21:34 UTC (rev 25554) >> > @@ -1355,6 +1355,9 @@ >> > } >> > >> > public synchronized boolean isEmpty(ObjectContainer container) { >> > - return (finished || blocks.isEmpty()); >> > + if(persistent) container.activate(blocks, 2); >> > + boolean ret = (finished || blocks.isEmpty()); >> > + if(persistent) container.deactivate(blocks, 1); >> >> object deactivated as a side effect of isEmpty() ! >> this is quite unexpected and may be very hard to debug later.. > > Eh? It's an internal object, we do that all the time.
I am saying "it don't work", I am saying "it is nasty to debug if we forget this some months later" >> >> > + return ret; >> > } >> > } > > _______________________________________________ > Devl mailing list > [email protected] > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl > _______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
