On Sunday 10 August 2008 18:44, batosai at freenetproject.org wrote:
> Author: batosai
> Date: 2008-08-10 17:44:52 +0000 (Sun, 10 Aug 2008)
> New Revision: 21722
>
> Modified:
> trunk/apps/WoT/src/plugins/WoT/WoT.java
> Log:
> Even uglier, if possible. But it works, this time.
>
> Modified: trunk/apps/WoT/src/plugins/WoT/WoT.java
> ===================================================================
> --- trunk/apps/WoT/src/plugins/WoT/WoT.java 2008-08-10 17:05:07 UTC (rev
21721)
> +++ trunk/apps/WoT/src/plugins/WoT/WoT.java 2008-08-10 17:44:52 UTC (rev
21722)
> @@ -171,13 +171,15 @@
>
> public Identity getIdentityByURI(FreenetURI uri) {
>
> + String searched = uri.toString().substring(0,
uri.toString().indexOf("/"));
> Identity identity = null;
>
> // This is ugly, I could not find a request able to find the
> good
identity
> ObjectSet<Identity> search = db.queryByExample(Identity.class);
> while (search.hasNext()) {
> Identity id = search.next();
> -
> if(id.getRequestURI().getRoutingKey().equals(uri.getRoutingKey())) {
> + String found =
> id.getRequestURI().toString().substring(0,
id.getRequestURI().toString().indexOf("/"));
> + if(found.equals(searched)) {
> identity = id;
> break;
> }
Arrays.equals(). :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080812/9c1820ec/attachment.pgp>