Author: toad
Date: 2007-10-27 17:17:04 +0000 (Sat, 27 Oct 2007)
New Revision: 15612

Modified:
   trunk/freenet/src/freenet/node/PeerManager.java
Log:
Remove the status hashset if it's empty. Don't add an empty hashset.

Modified: trunk/freenet/src/freenet/node/PeerManager.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerManager.java     2007-10-27 17:14:55 UTC 
(rev 15611)
+++ trunk/freenet/src/freenet/node/PeerManager.java     2007-10-27 17:17:04 UTC 
(rev 15612)
@@ -1166,7 +1166,8 @@
                                                Logger.error(this, 
"removePeerNodeStatus(): identity '"+peerNode.getIdentityString()+" for 
"+peerNode.shortToString()+"' not in peerNodeStatuses with status 
'"+PeerNode.getPeerNodeStatusString(peerNodeStatus.intValue())+"'", new 
Exception("debug"));
                                        return;
                                }
-                               statuses.remove(peerNodeStatus);
+                               if(statuses.isEmpty())
+                                       statuses.remove(peerNodeStatus);
                        } else {
                                statusSet = new HashSet();
                        }
@@ -1174,7 +1175,6 @@
                        if(statusSet.contains(peerNode)) {
                                statusSet.remove(peerNode);
                        }
-                       statuses.put(peerNodeStatus, statusSet);
                }
        }



Reply via email to