Author: toad
Date: 2007-12-06 01:40:16 +0000 (Thu, 06 Dec 2007)
New Revision: 16352
Modified:
trunk/freenet/src/freenet/node/SeedClientPeerNode.java
trunk/freenet/src/freenet/node/SeedServerPeerNode.java
Log:
Un-break equals() on SeedServerPeerNode.
Optimise both.
Modified: trunk/freenet/src/freenet/node/SeedClientPeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/SeedClientPeerNode.java 2007-12-06
01:23:08 UTC (rev 16351)
+++ trunk/freenet/src/freenet/node/SeedClientPeerNode.java 2007-12-06
01:40:16 UTC (rev 16352)
@@ -30,6 +30,7 @@
}
public boolean equals(Object o) {
+ if(o == this) return true;
// Only equal to seednode of its own type.
// Different to an OpennetPeerNode with the same identity!
if(o instanceof SeedClientPeerNode) {
Modified: trunk/freenet/src/freenet/node/SeedServerPeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/SeedServerPeerNode.java 2007-12-06
01:23:08 UTC (rev 16351)
+++ trunk/freenet/src/freenet/node/SeedServerPeerNode.java 2007-12-06
01:40:16 UTC (rev 16352)
@@ -36,9 +36,10 @@
}
public boolean equals(Object o) {
+ if(o == this) return true;
// Only equal to seednode of its own type.
// Different to an OpennetPeerNode with the same identity!
- if(o instanceof SeedClientPeerNode) {
+ if(o instanceof SeedServerPeerNode) {
return super.equals(o);
} else return false;
}