8375338: sun/awt/image/ImageRepresentation/LUTCompareTest.java fails with -Xcheck:jni

Reviewed-by: aivanov, serb, krk
This commit is contained in:
Phil Race 2026-01-23 18:53:48 +00:00
parent e08fb3a914
commit e88edd0bc6
2 changed files with 7 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -227,7 +227,7 @@ Java_sun_awt_image_ImageRepresentation_setICMpixels(JNIEnv *env, jclass cls,
/* Release the locked arrays */
(*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT, JNI_ABORT);
(*env)->ReleasePrimitiveArrayCritical(env, jpix, srcData, JNI_ABORT);
(*env)->ReleasePrimitiveArrayCritical(env, jdata, dstData, JNI_ABORT);
(*env)->ReleasePrimitiveArrayCritical(env, jdata, dstData, 0);
return JNI_TRUE;
}
@ -385,7 +385,7 @@ Java_sun_awt_image_ImageRepresentation_setDiffICM(JNIEnv *env, jclass cls,
}
(*env)->ReleasePrimitiveArrayCritical(env, jpix, srcData, JNI_ABORT);
(*env)->ReleasePrimitiveArrayCritical(env, jdata, dstData, JNI_ABORT);
(*env)->ReleasePrimitiveArrayCritical(env, jdata, dstData, 0);
return JNI_TRUE;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,13 @@
/*
* @test
* @bug 6570475
* @bug 6570475 8375338
* @summary Test verifies that palette comparison procedure of
* ImageRepresentation class does not produce extra transparent
* pixels.
*
* @run main LUTCompareTest
* @run main/othervm LUTCompareTest
* @run main/othervm -Xcheck:jni LUTCompareTest
*/