2003-01-10 Michael Koch <konqueror@gmx.de>
authorMichael Koch <konqueror@gmx.de>
Sat, 11 Jan 2003 00:51:29 +0000 (00:51 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Sat, 11 Jan 2003 00:51:29 +0000 (00:51 +0000)
* java/awt/DisplayMode.java
(equals): Fixed argument type and implementation.

From-SVN: r61184

libjava/ChangeLog
libjava/java/awt/DisplayMode.java

index e7e4ae61a16666fe4e6a3f79ff3676ccaaf5192f..562a6afbc8bd1f67f57c4702a6895ea7c5ff4738 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-10  Michael Koch  <konqueror@gmx.de>
+
+       * java/awt/DisplayMode.java
+       (equals): Fixed argument type and implementation.
+
 2003-01-07  Tom Tromey  <tromey@redhat.com>
 
        * include/posix.h (_Jv_platform_usleep): Wrap in ifdef
index b988e20be5e5bfa6c78be52ed424b5e8be101aeb..533ab5ef482a515877dd591292225640790fa34f 100644 (file)
@@ -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);
   }
 
   /**