From 20d513ff665af54cc8fb5cac4d2f4fe86ea94259 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Wed, 18 Jun 2003 08:15:42 +0000 Subject: [PATCH] 2003-06-18 Michael Koch * java/util/Locale.java (equals): Merged from classpath. From-SVN: r68144 --- libjava/ChangeLog | 5 +++++ libjava/java/util/Locale.java | 3 +++ 2 files changed, 8 insertions(+) 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));