On Thursday 05 February 2009 00:26, Daniel Cheng wrote:
> On Thu, Feb 5, 2009 at 3:21 AM, <toad at freenetproject.org> 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.
>
> > + return ret;
> > }
> > }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20090210/28a394a5/attachment.pgp>