summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2003-01-11 00:45:42 +0000
committerTom Tromey <tromey@redhat.com>2003-01-11 00:45:42 +0000
commitf38476df09b16c92e0fec28498cacb9f88abae21 (patch)
treef93ab6c1c1d99648b3e114a770b46dea4948b8f3
parentaa54ea1844bcd95a10f97b97f4f4e194cb0a37da (diff)
downloadclasspath-f38476df09b16c92e0fec28498cacb9f88abae21.tar.gz
2003-01-10 Michael Koch <konqueror@gmx.de>
* java/awt/DisplayMode.java (equals): Fixed argument type and implementation.
-rw-r--r--ChangeLog5
-rw-r--r--java/awt/DisplayMode.java16
2 files changed, 13 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a6100202..bbd75e6df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-10 Michael Koch <konqueror@gmx.de>
+
+ * java/awt/DisplayMode.java
+ (equals): Fixed argument type and implementation.
+
2003-01-10 Tom Tromey <tromey@redhat.com>
* java/util/ResourceBundle.java (static): Fixed indentation.
diff --git a/java/awt/DisplayMode.java b/java/awt/DisplayMode.java
index b988e20be..533ab5ef4 100644
--- a/java/awt/DisplayMode.java
+++ b/java/awt/DisplayMode.java
@@ -1,5 +1,5 @@
/* DisplayMode.java -- a description of display mode configurations
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -140,16 +140,16 @@ public final class DisplayMode
* Test for equality. This returns true for two modes with identical
* parameters.
*
- * @param o the object to compare to
+ * @param dm The display mode to compare to
+ *
* @return true if it is equal
*/
- public boolean equals(Object o)
+ public boolean equals (DisplayMode dm)
{
- if (! (o instanceof DisplayMode))
- return false;
- DisplayMode m = (DisplayMode) o;
- return width == m.width && height == m.height && bitDepth == m.bitDepth
- && refreshRate == m.refreshRate;
+ return (width == dm.width
+ && height == dm.height
+ && bitDepth == dm.bitDepth
+ && refreshRate == dm.refreshRate);
}
/**