JDK-4770289 : GlyphVector.equals is not overridden properly
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.2.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2002-10-29
  • Updated: 2002-10-30
  • Resolved: 2002-10-30
Related Reports
Duplicate :  
Description
The class java.awt.geom.Area overrides equals with class name as a signature.
Hence it does not override Object equals properly (reference:  "Effective Java" Item #7)

Note: This bug is flagged by a program that checks for programming
errors mentioned in "Effective Java" along with other checks.

The classes below needs to be considered as well:
       java.awt.DisplayMode
       java.awt.font.GlyphVector

The class below overrides equals() but not hashCode():
       java.awt.Font$FontLineMetrics

Comments
EVALUATION java.awt.geom.Area belongs to 2D. ###@###.### 2002-10-29 The Area.equals issue is already covered by 4634383. The DisplayMode.equals is covered by 4634385. So this bug now covers GlyphVector and possibly java.awt.Font$FontLineMetrics. In the future, please check the bug database before submitting bugs and please separate issues with different classes into different bug reports. ###@###.### 2002-10-29 Apologies, my mistake. I only checked for existing bugs in the awt and not 2D. The bug 4634383 covers both GlyphVector and java.awt.Font$FontLineMetrics Hence I am closing this bug. ###@###.### 2002-10-30
30-10-2002