-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
None
-
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.
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.
- duplicates
-
JDK-4430355 readParam.setDestinationType() throws IIOException for PNG and GIF.
-
- Closed
-
- relates to
-
JDK-8263981 java.awt.image.ComponentSampleModel equals/hashcode use numBands twice
-
- Resolved
-