dev@jaxb.java.net

Re: [jaxb2-sources] CVS update: /jaxb2-sources/jaxb-ri/runtime/src/com/sun/xml/bind/v2/runtime/unmarshaller/

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 06 Sep 2005 11:04:15 -0700

The following code is intentionally using ==, not equals for maximum
performance. We always use interned strings for tag names within the
unmarshaller.


bhaktimehta_at_dev.java.net wrote:
> File [changed]: TagName.java
> Url: https://jaxb2-sources.dev.java.net/source/browse/jaxb2-sources/jaxb-ri/runtime/src/com/sun/xml/bind/v2/runtime/unmarshaller/TagName.java?r1=1.3&r2=1.4
> Delta lines: +1 -1
> -------------------
> --- TagName.java 23 Aug 2005 19:01:28 -0000 1.3
> +++ TagName.java 2 Sep 2005 21:39:16 -0000 1.4
> @@ -57,7 +57,7 @@
> * Checks if the given name pair matches this name.
> */
> public final boolean matches( String nsUri, String local ) {
> - return this.uri==nsUri && this.local==local;
> + return this.uri.equals(nsUri) && this.local.equals(local);
> }


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com