8202105: Console echo is disabled when exiting jshell

Preserving original terminal echo state when Console.readPassword finishes.

Reviewed-by: sherman, martin
This commit is contained in:
Jan Lahoda 2018-04-30 15:03:08 +02:00
parent b9490e5760
commit f7afa8ff53
3 changed files with 31 additions and 55 deletions

View file

@ -82,14 +82,3 @@ Java_java_io_Console_echo(JNIEnv *env, jclass cls, jboolean on)
}
return old;
}
JNIEXPORT jboolean JNICALL
Java_java_io_Console_echo0(JNIEnv *env, jclass cls)
{
DWORD fdwMode;
if (! GetConsoleMode(hStdIn, &fdwMode)) {
JNU_ThrowIOExceptionWithLastError(env, "GetConsoleMode failed");
return JNI_TRUE;
}
return (fdwMode & ENABLE_ECHO_INPUT) != 0;
}