Author: toad
Date: 2007-08-15 21:38:08 +0000 (Wed, 15 Aug 2007)
New Revision: 14713

Modified:
   trunk/freenet/src/freenet/io/comm/MessageType.java
Log:
minor optimisation

Modified: trunk/freenet/src/freenet/io/comm/MessageType.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/MessageType.java  2007-08-15 21:31:04 UTC 
(rev 14712)
+++ trunk/freenet/src/freenet/io/comm/MessageType.java  2007-08-15 21:38:08 UTC 
(rev 14713)
@@ -92,7 +92,9 @@
                if (!(o instanceof MessageType)) {
                        return false;
                }
-               return ((MessageType) o)._name.equals(_name);
+               // We can only register one MessageType for each name.
+               // So we can do == here.
+               return ((MessageType) o)._name == _name;
        }

        public int hashCode() {


Reply via email to