On Wednesday 04 February 2009 00:08, Daniel Cheng wrote:
> On Wed, Feb 4, 2009 at 5:17 AM, <toad at freenetproject.org> wrote:
> > Author: toad
> > Date: 2009-02-03 21:17:21 +0000 (Tue, 03 Feb 2009)
> > New Revision: 25517
> >
> > Modified:
> > branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
> > Log:
> > Clone the URI
>
> FreenetURI is immutable, isn't it?
Yes but it can be deleted / deactivated.
>
> >
> > Modified:
branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
> > ===================================================================
> > ---
branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
2009-02-03 20:39:41 UTC (rev 25516)
> > +++
branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
2009-02-03 21:17:21 UTC (rev 25517)
> > @@ -493,12 +493,15 @@
> > try {
> > if(persistent) container.activate(sourceData, 1);
> > Bucket data = sourceData.createShadow();
> > + FreenetURI u = uri;
> > + if(u.getKeyType().equals("CHK")) u =
FreenetURI.EMPTY_CHK_URI;
> > + else u = u.clone();
> > if(data == null) {
> > data =
context.tempBucketFactory.makeBucket(sourceData.size());
> > BucketTools.copy(sourceData, data);
> > }
> > if(persistent) container.deactivate(sourceData, 1);
> > - return new BlockItem(this, data, isMetadata,
compressionCodec, sourceLength, uri, hashCode());
> > + return new BlockItem(this, data, isMetadata,
compressionCodec, sourceLength, u, hashCode());
> > } catch (IOException e) {
> > fail(new
InsertException(InsertException.BUCKET_ERROR, e, null), container, context);
> > return null;
> >
> > _______________________________________________
> > cvs mailing list
> > cvs at freenetproject.org
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> >
> _______________________________________________
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
>
-------------- 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/20090204/ea3cf016/attachment.pgp>