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??
> +
> +                     if (err.size() == 0) {
> +                             throw new RedirectPluginHTTPException("", 
> SELF_URI + "/ownidentities");
> +                     }
> +
> +                     return IdentityEditor.makeNewOwnIdentityPage(this, 
> nick, requestUri, 
insertUri, publish, err);
> +             }
> +
-------------- 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/20081110/2a696599/attachment.pgp>

Reply via email to