8153363: Redundant check for number of components in PackedColorModel.equals() method
authorjdv
Tue, 05 Apr 2016 14:52:31 +0530
changeset 37554 522133edaec6
parent 37553 44868bf2423d
child 37555 89696d7ce334
8153363: Redundant check for number of components in PackedColorModel.equals() method Reviewed-by: prr, flar
jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java
--- a/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java	Tue Apr 05 10:59:01 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java	Tue Apr 05 14:52:31 2016 +0530
@@ -404,9 +404,6 @@
 
         PackedColorModel cm = (PackedColorModel) obj;
         int numC = cm.getNumComponents();
-        if (numC != numComponents) {
-            return false;
-        }
         for(int i=0; i < numC; i++) {
             if (maskArray[i] != cm.getMask(i)) {
                 return false;