提交 5a865e63 编写于 作者: P pchelko

8030788: [Parfait] warnings from b119 for...

8030788: [Parfait] warnings from b119 for jdk/src/share/native/sun/awt/medialib: JNI exception pending
Reviewed-by: serb, prr
上级 d95dc36c
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, 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
......@@ -1151,6 +1151,7 @@ fprintf(stderr,"Flags : %d\n",dst->flags);
if (ddata == NULL) {
/* Need to store it back into the array */
if (storeRasterArray(env, srcRasterP, dstRasterP, dst) < 0) {
(*env)->ExceptionClear(env); // Could not store the array, try another way
retStatus = setPixelsFormMlibImage(env, dstRasterP, dst);
}
}
......@@ -2062,6 +2063,7 @@ cvtCustomToDefault(JNIEnv *env, BufImageS_t *imageP, int component,
jpixels = (*env)->NewIntArray(env, nbytes);
if (JNU_IsNull(env, jpixels)) {
(*env)->ExceptionClear(env);
JNU_ThrowOutOfMemoryError(env, "Out of Memory");
return -1;
}
......@@ -2127,6 +2129,7 @@ cvtDefaultToCustom(JNIEnv *env, BufImageS_t *imageP, int component,
jpixels = (*env)->NewIntArray(env, nbytes);
if (JNU_IsNull(env, jpixels)) {
(*env)->ExceptionClear(env);
JNU_ThrowOutOfMemoryError(env, "Out of Memory");
return -1;
}
......@@ -2823,21 +2826,14 @@ static int expandICM(JNIEnv *env, BufImageS_t *imageP, unsigned int *mDataP)
/* Need to grab the lookup tables. Right now only bytes */
rgb = (int *) (*env)->GetPrimitiveArrayCritical(env, cmP->jrgb, NULL);
CHECK_NULL_RETURN(rgb, -1);
/* Interleaved with shared data */
dataP = (void *) (*env)->GetPrimitiveArrayCritical(env,
rasterP->jdata, NULL);
if (rgb == NULL || dataP == NULL) {
if (dataP == NULL) {
/* Release the lookup tables */
if (rgb) {
(*env)->ReleasePrimitiveArrayCritical(env, cmP->jrgb, rgb,
JNI_ABORT);
}
if (dataP) {
(*env)->ReleasePrimitiveArrayCritical(env,
rasterP->jdata, dataP,
JNI_ABORT);
}
(*env)->ReleasePrimitiveArrayCritical(env, cmP->jrgb, rgb, JNI_ABORT);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册