8161431: JNI pending exceptions in ProcessHandleImpl_linux.c and ProcessHandleImpl_unix.c

Reviewed-by: naoto
This commit is contained in:
Roger Riggs 2016-08-08 13:55:16 -04:00
parent d252f6a613
commit e54c445538
2 changed files with 4 additions and 1 deletions

View File

@ -146,6 +146,7 @@ void os_getCmdlineAndUserInfo(JNIEnv *env, jobject jinfo, pid_t pid) {
snprintf(fn, sizeof fn, "/proc/%d", pid);
if (stat(fn, &stat_buf) == 0) {
unix_getUserInfo(env, jinfo, stat_buf.st_uid);
JNU_CHECK_EXCEPTION(env);
}
/*

View File

@ -429,7 +429,9 @@ void unix_fillArgArray(JNIEnv *env, jobject jinfo, int nargs, char *cp,
if (nargs >= 1) {
// Create a String array for nargs-1 elements
argsArray = (*env)->NewObjectArray(env, nargs - 1, JNU_ClassString(env), NULL);
jclass clazzString = JNU_ClassString(env);
CHECK_NULL(clazzString);
argsArray = (*env)->NewObjectArray(env, nargs - 1, clazzString, NULL);
CHECK_NULL(argsArray);
for (i = 0; i < nargs - 1; i++) {