summaryrefslogtreecommitdiff
path: root/libjava/java/text/DateFormat.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2003-06-21 12:42:26 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2003-06-21 12:42:26 +0000
commit73c7dd50e8f9b03e6fbc64212566d1a2d603aed2 (patch)
treea6fa0c9f0fdd054674395836f55efab40ef19fe3 /libjava/java/text/DateFormat.java
parent5ee8128f1b139e4e1e6330acca7c014aee28abc7 (diff)
DateFormat.java, [...]: New versions from classpath.
2003-06-21 Michael Koch <konqueror@gmx.de> * java/text/DateFormat.java, java/text/SimpleDateFormat.java, java/util/Locale.java: New versions from classpath. From-SVN: r68300
Diffstat (limited to 'libjava/java/text/DateFormat.java')
-rw-r--r--libjava/java/text/DateFormat.java14
1 files changed, 8 insertions, 6 deletions
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
* <ul>
* <li>Is not <code>null</code>.
* <li>Is an instance of <code>DateFormat</code>.
- * <li>Has the same calendar and numberFormat field values as this object.
+ * <li>Has the same numberFormat field value as this object.
* </ul>
*
* @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;
}
/**