You're papering over the problem - WHY is there no identity?
On Friday 21 November 2008 00:39, j16sdiz at freenetproject.org wrote:
> Author: j16sdiz
> Date: 2008-11-21 00:39:31 +0000 (Fri, 21 Nov 2008)
> New Revision: 23764
>
> Modified:
> trunk/freenet/src/freenet/node/OpennetManager.java
> Log:
> fix NPE
>
> Modified: trunk/freenet/src/freenet/node/OpennetManager.java
> ===================================================================
> --- trunk/freenet/src/freenet/node/OpennetManager.java 2008-11-20
> 23:31:45
UTC (rev 23763)
> +++ trunk/freenet/src/freenet/node/OpennetManager.java 2008-11-21
> 00:39:31
UTC (rev 23764)
> @@ -682,7 +682,7 @@
> return null;
> }
>
> - //registerKnownIdentity(ref.get("identity"));
> + if (ref != null) registerKnownIdentity(ref.get("identity"));
> return ref;
> }
>
> @@ -704,6 +704,8 @@
> private final TimeSortedHashtable<String> knownIds = new
TimeSortedHashtable<String>();
>
> private void registerKnownIdentity(String d) {
> + if (d == null) return; // why?
> +
> if (logMINOR)
> Logger.minor(this, "Known Id: " + d);
> long now = System.currentTimeMillis();
>
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
>
>
-------------- 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/20081121/20ffd0c6/attachment.pgp>