提交 8e60a505 编写于 作者: A alanb

6988037: fileClose prints debug message is close fails

Reviewed-by: kevinw, forax
上级 bc658fe9
...@@ -83,8 +83,6 @@ fileClose(JNIEnv *env, jobject this, jfieldID fid) ...@@ -83,8 +83,6 @@ fileClose(JNIEnv *env, jobject this, jfieldID fid)
close(devnull); close(devnull);
} }
} else if (JVM_Close(fd) == -1) { } else if (JVM_Close(fd) == -1) {
SET_FD(this, fd, fid); // restore fd JNU_ThrowIOExceptionWithLastError(env, "close failed");
printf("JVM_Close returned -1\n");
JNU_ThrowIOExceptionWithLastError(env, "close failed");
} }
} }
...@@ -531,7 +531,6 @@ handleClose(JNIEnv *env, jobject this, jfieldID fid) ...@@ -531,7 +531,6 @@ handleClose(JNIEnv *env, jobject this, jfieldID fid)
SET_FD(this, -1, fid); SET_FD(this, -1, fid);
if (CloseHandle(h) == 0) { /* Returns zero on failure */ if (CloseHandle(h) == 0) { /* Returns zero on failure */
SET_FD(this, fd, fid); // restore fd
JNU_ThrowIOExceptionWithLastError(env, "close failed"); JNU_ThrowIOExceptionWithLastError(env, "close failed");
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册