[OpenJDK 2D-Dev] equals() and hashCode() verification in java.awt.image.ComponentSampleModel and its subclassses

Jayathirth D V jayathirth.d.v at oracle.com
Thu May 5 07:02:37 UTC 2016

Hi Jim,


I am trying to modify/add equals()/hashCode() methods in java.awt.image.ComponentSampleModel() and its subclasses.


In BandedSampleModel and PixelInterleavedSampleModel I see that we have just hashCode() functions and not equals() and these hashCode() function are returning just constant value.

I am not able to find private variables or unique properties which are set in BandedSampleModel/PixelInterleavedSampleModel for the need to override equals()/hashCode() methods. 

Can we remove hashCode() function present BandedSampleModel/PixelInterleavedSampleModel and rely on ComponentSampleModel? What is the purpose of having hasCode() function returning constant value in these subclasses?

Please provide your inputs.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160505/f3224cbc/attachment.html>

More information about the 2d-dev mailing list