> -----Original Message-----
> From: devl-bounces at freenetproject.org 
> [mailto:devl-bounces at freenetproject.org] On Behalf Of Matthew Toseland
> Sent: Thursday, November 13, 2008 6:25 PM
> To: Discussion of development issues
> Subject: Re: [freenet-dev] [freenet-cvs] r23459 - trunk/plugins/WoT
> 
> On Thursday 13 November 2008 16:45, xor wrote:
> > 
> > > > +               try {
> > > > +                       Identity id = Identity.getByURI(db,
> > > state.getURI());
> > > > +                       identities.remove(id);
> > > 
> > > You *really* should check the return value here. I've had 
> wierd bugs 
> > > with this sort of thing.
> > > 
> > > > +               } catch(UnknownIdentityException ex) {}
> > > > +               
> > > >         }
> > > 
> > 
> > You mean db4o could return a different ientity than the 
> requested one 
> > or what?!?
> 
> No... well hopefully not. I mean state.getURI() might return 
> something wrong,
> identities.remove() might fail because of some wierd bug ... 
> just check the retval and log an ERROR if it's not 
> successfully removed.
> 

Why should state.getURI() return something wrong? If you're 
talking about the docname or filename, thats no problem,
Identity.getByURI just uses the SSK keys of the URI.
But those should be returned correctly by state.getURI() ?


Reply via email to