-
Sub-task
-
Resolution: Delivered
-
P4
-
22
-
generic
-
generic
`System.console()` has changed in this release to return a `Console` with enhanced editing features that improve the experience of programs that use the `Console` API. In addition, `System.console()` now returns a `Console` object when the standard streams are redirected or connected to a virtual terminal. In prior releases, `System.console()` returned `null` for these cases. This change may impact code that uses the return from `System.console()` to test if the VM is connected to a terminal. If needed, running with `-Djdk.console=java.base` will restore older behavior where the console is only returned when it is connected to a terminal.
A new method `Console.isTerminal()` has been added to test if console is connected to a terminal.
A new method `Console.isTerminal()` has been added to test if console is connected to a terminal.