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

SampleModel/ColorModel classes should implement equals(), hashCode()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • client-libs
    • None
    • 2d
    • beta2
    • generic
    • generic, solaris_7

      Image I/O contains a class called ImageTypeSpecifier that encapsulates
      a ColorModel and a prototype 1x1 SampleModel that may be used to describe
      an image layout abstractly. In order to make equals() comparisons between
      ImageTypeSpecifiers work correctly, there needs to be a way to compare
      two SampleModels that may be separate instances but contain identical
      values.

        Similarly, although ColorModel implements equals(), there is no implementation
      in IndexColorModel, so two IndexColorModels with different LUTs may compare
      as equal.

        Any class that overrides Object,equals() must also override Object.hashCode,
      so hashCode implementations based on the fields compared in equals() should
      be provided.

            dricesunw Daniel Rice (Inactive)
            dricesunw Daniel Rice (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: