Author: j16sdiz
Date: 2008-12-05 07:04:42 +0000 (Fri, 05 Dec 2008)
New Revision: 24061

Modified:
   trunk/freenet/src/freenet/node/OpennetManager.java
Log:
move the null check, document why it may null

Modified: trunk/freenet/src/freenet/node/OpennetManager.java
===================================================================
--- trunk/freenet/src/freenet/node/OpennetManager.java  2008-12-05 06:55:08 UTC 
(rev 24060)
+++ trunk/freenet/src/freenet/node/OpennetManager.java  2008-12-05 07:04:42 UTC 
(rev 24061)
@@ -682,7 +682,11 @@
                        return null;
                }
        
-               if (ref != null) registerKnownIdentity(ref.get("identity"));
+               if (ref != null) {
+                       String identity = ref.get("identity");
+                       if (identity != null) // N2N_MESSAGE_TYPE_DIFFNODEREF 
don't have identity
+                               registerKnownIdentity(identity);
+               }
                return ref;
        }
 
@@ -704,8 +708,6 @@
        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
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to