提交 85ec644b 编写于 作者: S sherman

8022178: System.console() throws IOE on some Windows

Summary: to remove the IOE throwing code
Reviewed-by: alanb
上级 d8897ade
......@@ -38,12 +38,10 @@ Java_java_io_Console_istty(JNIEnv *env, jclass cls)
{
if (hStdIn == INVALID_HANDLE_VALUE &&
(hStdIn = GetStdHandle(STD_INPUT_HANDLE)) == INVALID_HANDLE_VALUE) {
JNU_ThrowIOExceptionWithLastError(env, "Open Console input failed");
return JNI_FALSE;
}
if (hStdOut == INVALID_HANDLE_VALUE &&
(hStdOut = GetStdHandle(STD_OUTPUT_HANDLE)) == INVALID_HANDLE_VALUE) {
JNU_ThrowIOExceptionWithLastError(env, "Open Console output failed");
return JNI_FALSE;
}
if (GetFileType(hStdIn) != FILE_TYPE_CHAR ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册