-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt new behavior of System.console() since JDK22 #40087
Comments
/cc @Sanne (core), @aloubyansky (core), @gsmet (core), @radcortez (core), @stuartwdouglas (core) |
I think using reflection would be the simplest approach here, ideally guarded by a version check so we don't make the reflection calls for older versions. |
+1 as I am pretty sure we are not setup for MR-Jars in the main Quarkus repo. |
@Eng-Fouad would you like to contribute this? |
Submitted a PR. Do we need to register |
AFAIK graal should be able to detect this case automatically because it is basically hard coded. |
Adapt new behavior of System.console() since JDK22
Description
Since JDK22:
I looked into Quarkus codebase and I found the following snippets that might need to be changed:
quarkus/core/devmode-spi/src/main/java/io/quarkus/dev/console/QuarkusConsole.java
Lines 121 to 123 in 3b97e89
quarkus/core/devmode-spi/src/main/java/io/quarkus/dev/console/BasicConsole.java
Lines 32 to 37 in 3b97e89
quarkus/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/utils/Prompt.java
Lines 27 to 33 in 3b97e89
Implementation ideas
Change
System.console() != null
toSystem.console() != null && System.console().isTerminal()
.Since
isTerminal()
is a new method introduced in JDK22, we can either:The text was updated successfully, but these errors were encountered: