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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 1.4.0
    • Affects Version/s: 1.4.0
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: