Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4770289

GlyphVector.equals is not overridden properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.1
    • client-libs
    • None
    • 2d
    • generic
    • generic

      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

            dougfelt Doug Felt
            jhangalsunw Jayalaxmi Hangal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: