mirror of
https://github.com/openjdk/jdk.git
synced 2026-06-01 00:02:37 +00:00
8022178: System.console() throws IOE on some Windows
To remove the IOE throwing code Reviewed-by: alanb
This commit is contained in:
parent
57b04c9183
commit
bc17f4b068
@ -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 ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user