8024697: Fix for 8020983 causes Xcheck:jni warnings
Reviewed-by: prr, jchen
This commit is contained in:
parent
47f48cad92
commit
e3016af23b
@ -930,9 +930,10 @@ imageio_fill_input_buffer(j_decompress_ptr cinfo)
|
||||
* Now fill a complete buffer, or as much of one as the stream
|
||||
* will give us if we are near the end.
|
||||
*/
|
||||
RELEASE_ARRAYS(env, data, src->next_input_byte);
|
||||
|
||||
GET_IO_REF(input);
|
||||
|
||||
RELEASE_ARRAYS(env, data, src->next_input_byte);
|
||||
ret = (*env)->CallIntMethod(env,
|
||||
input,
|
||||
JPEGImageReader_readInputDataID,
|
||||
@ -1017,9 +1018,11 @@ imageio_fill_suspended_buffer(j_decompress_ptr cinfo)
|
||||
memcpy(sb->buf, src->next_input_byte, offset);
|
||||
}
|
||||
|
||||
GET_IO_REF(input);
|
||||
|
||||
RELEASE_ARRAYS(env, data, src->next_input_byte);
|
||||
|
||||
GET_IO_REF(input);
|
||||
|
||||
buflen = sb->bufferLength - offset;
|
||||
if (buflen <= 0) {
|
||||
if (!GET_ARRAYS(env, data, &(src->next_input_byte))) {
|
||||
@ -1121,9 +1124,10 @@ imageio_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
|
||||
return;
|
||||
}
|
||||
|
||||
RELEASE_ARRAYS(env, data, src->next_input_byte);
|
||||
|
||||
GET_IO_REF(input);
|
||||
|
||||
RELEASE_ARRAYS(env, data, src->next_input_byte);
|
||||
ret = (*env)->CallLongMethod(env,
|
||||
input,
|
||||
JPEGImageReader_skipInputBytesID,
|
||||
@ -2306,10 +2310,10 @@ imageio_empty_output_buffer (j_compress_ptr cinfo)
|
||||
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
|
||||
jobject output = NULL;
|
||||
|
||||
GET_IO_REF(output);
|
||||
|
||||
RELEASE_ARRAYS(env, data, (const JOCTET *)(dest->next_output_byte));
|
||||
|
||||
GET_IO_REF(output);
|
||||
|
||||
(*env)->CallVoidMethod(env,
|
||||
output,
|
||||
JPEGImageWriter_writeOutputDataID,
|
||||
@ -2348,10 +2352,10 @@ imageio_term_destination (j_compress_ptr cinfo)
|
||||
if (datacount != 0) {
|
||||
jobject output = NULL;
|
||||
|
||||
GET_IO_REF(output);
|
||||
|
||||
RELEASE_ARRAYS(env, data, (const JOCTET *)(dest->next_output_byte));
|
||||
|
||||
GET_IO_REF(output);
|
||||
|
||||
(*env)->CallVoidMethod(env,
|
||||
output,
|
||||
JPEGImageWriter_writeOutputDataID,
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8020983
|
||||
* @bug 8020983 8024697
|
||||
* @summary Test verifies that jpeg writer instances are collected
|
||||
* even if destroy() or reset() methods is not invoked.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user