ws-woden-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkapu...@apache.org
Subject svn commit: r326108 - /incubator/woden/java/src/javax/xml/namespace/QName.java
Date Tue, 18 Oct 2005 13:54:32 GMT
Author: jkaputin
Date: Tue Oct 18 06:54:27 2005
New Revision: 326108

URL: http://svn.apache.org/viewcvs?rev=326108&view=rev
Log:
in equals() method, reverted from .equals back to '=='
because we use intern strings so the result will always
be the same, but the latter is faster.

Modified:
    incubator/woden/java/src/javax/xml/namespace/QName.java

Modified: incubator/woden/java/src/javax/xml/namespace/QName.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/javax/xml/namespace/QName.java?rev=326108&r1=326107&r2=326108&view=diff
==============================================================================
--- incubator/woden/java/src/javax/xml/namespace/QName.java (original)
+++ incubator/woden/java/src/javax/xml/namespace/QName.java Tue Oct 18 06:54:27 2005
@@ -231,8 +231,11 @@
       return false;
     }
 
-    if (namespaceURI.equals(((QName)obj).namespaceURI)
-        && localPart.equals(((QName)obj).localPart))
+    //We use intern strings, so can use '==' instead of .equals
+    //for better performance.
+    
+    if ((namespaceURI == ((QName)obj).namespaceURI)
+        && (localPart == ((QName)obj).localPart))
     {
       return true;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


Mime
View raw message