Name: gm110360 Date: 11/19/2001
java version "1.4.0-beta3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)
As can be seen from DisplayMode source equals( DisplayMode ) doesn't check null.
public boolean equals(DisplayMode dm) {
return (getHeight() == dm.getHeight()
&& getWidth() == dm.getWidth()
&& getBitDepth() == dm.getBitDepth()
&& getRefreshRate() == dm.getRefreshRate());
}
Also, shouldn't DisplayMode override equals( Object ) and call equals( displayMode ) if obj instanceof DisplayMode?
(Review ID: 134949)
======================================================================