Author: nextgens
Date: 2006-05-18 14:57:49 +0000 (Thu, 18 May 2006)
New Revision: 8771

Modified:
   trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java
   trunk/freenet/src/freenet/node/Node.java
   trunk/freenet/src/freenet/node/PeerNode.java
Log:
clarify the code, using the appropriated semantic

Modified: trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java       
2006-05-18 14:36:43 UTC (rev 8770)
+++ trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java       
2006-05-18 14:57:49 UTC (rev 8771)
@@ -9,7 +9,6 @@
 import java.net.URLConnection;
 import java.util.Arrays;
 import java.util.Comparator;
-import java.util.Hashtable;
 import java.util.Enumeration;

 import freenet.client.HighLevelSimpleClient;
@@ -112,7 +111,6 @@

                // Create array
                Object[][] rows = new Object[peerNodes.length][];
-               String[][] messageTypesRows = new String[peerNodes.length][];
                for(int i=0;i<peerNodes.length;i++) {
                        PeerNode pn = peerNodes[i];
                        long routingBackedOffUntil = 
pn.getRoutingBackedOffUntil();
@@ -122,7 +120,6 @@

                        // Elements must be HTML encoded.
                        Object[] row = new Object[9];  // where [0] is the pn 
object!
-                       String[] messageTypesRow = new String[2];
                        rows[i] = row;

                        Object status;
@@ -358,7 +355,7 @@
                                this.sendErrorPage(ctx, 200, "Failed To Add 
Node", "Unable to parse the given text: <pre>" + HTMLEncoder.encode(ref) + 
"</pre> as a node reference: " + HTMLEncoder.encode(e1.toString()) + ".<br /> 
Please <a href=\".\">Try again</a>");
                                return;
                        }
-                       if(pn.getIdentity()==node.getIdentity()) {
+                       if(pn.getIdentityHash()==node.getIdentityHash()) {
                                this.sendErrorPage(ctx, 200, "Failed To Add 
Node", "You can't add your own node to the list of remote peers.<br /> <a 
href=\".\">Return to the connections page</a>");
                                return;
                        }

Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java    2006-05-18 14:36:43 UTC (rev 
8770)
+++ trunk/freenet/src/freenet/node/Node.java    2006-05-18 14:57:49 UTC (rev 
8771)
@@ -2601,7 +2601,7 @@
                return this.bindto;
        }

-       public int getIdentity(){
+       public int getIdentityHash(){
                return Fields.hashCode(identityHash);
        }


Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java        2006-05-18 14:36:43 UTC 
(rev 8770)
+++ trunk/freenet/src/freenet/node/PeerNode.java        2006-05-18 14:57:49 UTC 
(rev 8771)
@@ -473,7 +473,7 @@
     /**
      * Returns a unique node identifier (usefull to compare 2 pn)
      */
-    public int getIdentity(){
+    public int getIdentityHash(){
        return hashCode;
     }



Reply via email to