> -----Original Message----- > From: devl-bounces at freenetproject.org > [mailto:devl-bounces at freenetproject.org] On Behalf Of Matthew Toseland > Sent: Monday, November 10, 2008 10:26 PM > To: devl at freenetproject.org > Subject: Re: [freenet-dev] [freenet-cvs] r23278 - > trunk/plugins/FMSPlugin > > On Saturday 01 November 2008 14:03, xor at freenetproject.org wrote: > > Author: xor > > Date: 2008-11-01 14:03:26 +0000 (Sat, 01 Nov 2008) New > Revision: 23278 > > > > Added: > > trunk/plugins/FMSPlugin/FMS.java > > Removed: > > trunk/plugins/FMSPlugin/FMSPlugin.java > > Log: > > Move content of old class FMS to class FMSPlugin and rename > FMSPlugin > > to > FMS. > > > > Copied: trunk/plugins/FMSPlugin/FMS.java (from rev 23277, > trunk/plugins/FMSPlugin/FMSPlugin.java) > > =================================================================== > > --- trunk/plugins/FMSPlugin/FMS.java (rev 0) > > +++ trunk/plugins/FMSPlugin/FMS.java 2008-11-01 > 14:03:26 UTC (rev 23278) > .... > > + if (page.equals("/createownidentity")) { > > + List<String> err = new ArrayList<String>(); > > + String nick = > request.getPartAsString("nick", 1024).trim(); > > + String requestUri = > request.getPartAsString("requestURI", 1024); > > + String insertUri = > request.getPartAsString("insertURI", 1024); > > + boolean publish > = "true".equals(request.getPartAsString("publishTrustList", 24)); > > + > > + IdentityEditor.checkNick(err, nick); > > + > > + if ((requestUri.length() == 0) && > (insertUri.length() == 0)) { > > + FreenetURI[] kp = > client.generateKeyPair("fms"); > > + insertUri = kp[0].toString(); > > + requestUri = kp[1].toString(); > > + err.add("URI was empty, I > generated one for you."); > > + return > IdentityEditor.makeNewOwnIdentityPage(this, nick, > > +requestUri, > insertUri, publish, err); > > + } > > + > > + IdentityEditor.checkInsertURI(err, insertUri); > > + IdentityEditor.checkRequestURI(err, requestUri); > > + > > + if (err.size() == 0) { > > + // FIXME: use identity manager > to implement this > > + throw new > UnsupportedOperationException(); > > + /* > > + FMSOwnIdentity oi = new > FMSOwnIdentity(nick, requestUri, > > +insertUri, > publish); > > + > IdentityEditor.addNewOwnIdentity(db_config, oi, err); > > + */ > > + } > > What's going on with the if(err.size()==0) { throw } ?? What > are we doing here? AFAICS if it's successful then err.size() > will be 0??
The code which was there was broken/made obsolete by my refactoring, therefore I deactivated it. I usually throw UnsupportedOperationException when something is not implemented yet as some IDE (Netbeans?) does that, too.
