changeset 5983:d59dc08047fd

8012112: java/awt/image/mlib/MlibOpsTest.java fails on sparc solaris Reviewed-by: prr, vadim
author bae
date Mon, 15 Apr 2013 14:15:21 +0400
parents f602974a14c3
children cb27c7d6e1fb 898c92b7ab12
files src/share/native/sun/awt/medialib/awt_ImagingLib.c test/java/awt/image/mlib/MlibOpsTest.java
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/awt/medialib/awt_ImagingLib.c	Fri Apr 12 14:15:17 2013 +0400
+++ b/src/share/native/sun/awt/medialib/awt_ImagingLib.c	Mon Apr 15 14:15:21 2013 +0400
@@ -1308,13 +1308,17 @@
         return 0;
     }
 
+    ncomponents = srcImageP->cmodel.isDefaultCompatCM
+        ? 4
+        : srcImageP->cmodel.numComponents;
+
     /* Make sure that color order can be used for
      * re-ordering of lookup arrays.
      */
     for (i = 0; i < nbands; i++) {
         int idx = srcImageP->hints.colorOrder[i];
 
-        if (idx < 0 || idx >= nbands) {
+        if (idx < 0 || idx >= ncomponents) {
             awt_freeParsedImage(srcImageP, TRUE);
             awt_freeParsedImage(dstImageP, TRUE);
             return 0;
@@ -1323,10 +1327,6 @@
 
     lut_nbands = (*env)->GetArrayLength(env, jtableArrays);
 
-    ncomponents = srcImageP->cmodel.isDefaultCompatCM
-        ? 4
-        : srcImageP->cmodel.numComponents;
-
     if (lut_nbands > ncomponents) {
         lut_nbands = ncomponents;
     }
--- a/test/java/awt/image/mlib/MlibOpsTest.java	Fri Apr 12 14:15:17 2013 +0400
+++ b/test/java/awt/image/mlib/MlibOpsTest.java	Mon Apr 15 14:15:21 2013 +0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug     6556332 8011992
+ * @bug     6556332 8011992 8012112
  * @summary Test verifies that on-demnad loading of medialib library does
  *          not break imageing ops based on this library.
  * @run     main MlibOpsTest