From 73c7dd50e8f9b03e6fbc64212566d1a2d603aed2 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Sat, 21 Jun 2003 12:42:26 +0000 Subject: DateFormat.java, [...]: New versions from classpath. 2003-06-21 Michael Koch * java/text/DateFormat.java, java/text/SimpleDateFormat.java, java/util/Locale.java: New versions from classpath. From-SVN: r68300 --- libjava/java/text/DateFormat.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'libjava/java/text/DateFormat.java') diff --git a/libjava/java/text/DateFormat.java b/libjava/java/text/DateFormat.java index c298ef23342..df2b270e4f3 100644 --- a/libjava/java/text/DateFormat.java +++ b/libjava/java/text/DateFormat.java @@ -101,7 +101,7 @@ public abstract class DateFormat extends Format implements Cloneable * * * @param obj The object to test for equality against. @@ -111,10 +111,12 @@ public abstract class DateFormat extends Format implements Cloneable */ public boolean equals (Object obj) { - if (! (obj instanceof DateFormat)) + if (!(obj instanceof DateFormat)) return false; + DateFormat d = (DateFormat) obj; - return calendar.equals(d.calendar) && numberFormat.equals(d.numberFormat); + + return numberFormat.equals(d.numberFormat); } /** @@ -467,10 +469,10 @@ public abstract class DateFormat extends Format implements Cloneable */ public int hashCode () { - int hash = calendar.hashCode(); if (numberFormat != null) - hash ^= numberFormat.hashCode(); - return hash; + return numberFormat.hashCode(); + else + return 0; } /** -- cgit v1.2.3