Author: toad
Date: 2007-07-07 20:45:34 +0000 (Sat, 07 Jul 2007)
New Revision: 13983

Modified:
   trunk/freenet/src/freenet/node/PeerNode.java
Log:
Bug paranoia - we can see what exactly is null now (got an NPE from a user)

Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java        2007-07-07 17:11:55 UTC 
(rev 13982)
+++ trunk/freenet/src/freenet/node/PeerNode.java        2007-07-07 20:45:34 UTC 
(rev 13983)
@@ -776,7 +776,9 @@
                        addedLocalhost = true;
                }
                for(int j=0;j<nodePeers.length;j++) {
-                       if(nodePeers[j].getFreenetAddress().equals(addr)) {
+                       // REDFLAG - Two lines so we can see which variable is 
null when it NPEs
+                       FreenetInetAddress myAddr = 
nodePeers[j].getFreenetAddress();
+                       if(myAddr.equals(addr)) {
                                if(!addedLocalhost)
                                        peers.add(new Peer(localhost, 
p.getPort()));
                                addedLocalhost = true;


Reply via email to