Skip to content

Commit

Permalink
[#2083][#2084] bugfix & added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Aug 26, 2023
1 parent 8049825 commit ddc148b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/picocli/CommandLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -17845,9 +17845,9 @@ static boolean calcTTY() {
if (console == null) {
return false;
}
try {
try { // [#2083][#2084] Java 22 update
Method isTerminal = Class.forName("java.io.Console").getDeclaredMethod("isTerminal");
return (boolean) isTerminal.invoke(console);
return (Boolean) isTerminal.invoke(console);
} catch (NoSuchMethodException e) {
return true;
}
Expand Down

0 comments on commit ddc148b

Please sign in to comment.