diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 03cf46dc43c..67fb114328d 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2003-06-18 Michael Koch + + * java/util/Locale.java + (equals): Merged from classpath. + 2003-06-18 Michael Koch * java/net/InetAddress.java: diff --git a/libjava/java/util/Locale.java b/libjava/java/util/Locale.java index 37dea4e69e8..60fdd0ad93b 100644 --- a/libjava/java/util/Locale.java +++ b/libjava/java/util/Locale.java @@ -723,9 +723,12 @@ public final class Locale implements Serializable, Cloneable */ public boolean equals(Object obj) { + if (this == obj) + return true; if (! (obj instanceof Locale)) return false; Locale l = (Locale) obj; + return (language.equals(l.language) && country.equals(l.country) && variant.equals(l.variant));