Without checking the context of this method, this change isn't fixing a
"bug". I assume that the idea here is that the method returns quickly if
s and t happen to be the same string (or if they are both null, which
seems to be a valid input given the last line of javadoc.)
Changing this to equals would actually break such cases.
bhaktimehta_at_dev.java.net wrote:
> File [changed]: Util.java
> Url: https://jaxb2-sources.dev.java.net/source/browse/jaxb2-sources/jaxb-ri/schemagen/src/com/sun/xml/bind/v2/schemagen/Util.java?r1=1.1&r2=1.2
> Delta lines: +1 -1
> -------------------
> --- Util.java 15 Jul 2005 22:23:54 -0000 1.1
> +++ Util.java 2 Sep 2005 21:40:40 -0000 1.2
> @@ -83,7 +83,7 @@
> * equal or either of them are null.
> */
> public static boolean equalsIgnoreCase(String s, String t) {
> - if (s == t) return true;
> + if (s.equals(t)) return true;
> if ((s != null) && (t != null)) {
> return s.equalsIgnoreCase(t);
> }
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com