提交 e8bda8d8 编写于 作者: D dxu

8021977: Opening a file using java.io can throw IOException on Windows

Summary: Remove IOException related error-handling code for backward compatibility
Reviewed-by: alanb, lancea, mr
上级 f12cca23
...@@ -251,12 +251,6 @@ winFileHandleOpen(JNIEnv *env, jstring path, int flags) ...@@ -251,12 +251,6 @@ winFileHandleOpen(JNIEnv *env, jstring path, int flags)
free(pathbuf); free(pathbuf);
if (h == INVALID_HANDLE_VALUE) { if (h == INVALID_HANDLE_VALUE) {
int error = GetLastError();
if (error == ERROR_TOO_MANY_OPEN_FILES) {
JNU_ThrowByName(env, JNU_JAVAIOPKG "IOException",
"Too many open files");
return -1;
}
throwFileNotFoundException(env, path); throwFileNotFoundException(env, path);
return -1; return -1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册