[OpenJDK 2D-Dev] Review Request for JDK-7107905: equals() method in IndexColorModel doesnt exist and it relies on ColorModel.equals() which is not strict

Jayathirth D V jayathirth.d.v at oracle.com
Wed Apr 6 11:47:25 UTC 2016



Please review the following fix in JDK9:


Bug : https://bugs.openjdk.java.net/browse/JDK-7107905 


Webrev : http://cr.openjdk.java.net/~jdv/7107905/webrev.00/ 


Issue : When we compare two IndexColorModel objects with different ColorMap(or any other property specific to IndexColorModel) using equals() method it returns true.


Root cause : There is no override equals() method specific to IndexColorModel and it uses super class equals() which is ColorModel and it doesn't verify equality for IndexColorModel specific properties.


Solution : Add override equals() method for IndexColorModel which verifies its unique properties for equality.




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

More information about the 2d-dev mailing list