You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the docs https://www.javadoc.io/doc/org.jline/jline/3.14.1/org/jline/terminal/Terminal.html it states that "Terminals should be closed by calling the Closeable.close() method in order to restore their original state" although I cannot tellw ithout looking at the code what resources it might actually free and what constitutes the "original state".
The text was updated successfully, but these errors were encountered:
Yes, looking at some Terminal implementations it seems quite important that close is called.
See for example AbstractWindowsTerminal.
Thank you for pointing this out!
I will fix this when I get a chance.
It seems it is doing quite a bit, thanks! If you want I can make a PR for you for the example. If I remember correctly, you are on Java 1.5, so try-with-resource is not an option.
That module (picocli-shell-jline3) is compiled with Java 8 because JLine3 requires Java 8, so actually both the doc and the running example could use try-with-resources.
Thanks as always for your help!
dwalluck
added a commit
to dwalluck/picocli
that referenced
this issue
Sep 11, 2020
Should this line ensure that the terminal is closed?
picocli/picocli-shell-jline3/src/test/java/picocli/shell/jline3/example/Example.java
Line 165 in 72e1d4f
In the docs https://www.javadoc.io/doc/org.jline/jline/3.14.1/org/jline/terminal/Terminal.html it states that "Terminals should be closed by calling the Closeable.close() method in order to restore their original state" although I cannot tellw ithout looking at the code what resources it might actually free and what constitutes the "original state".
The text was updated successfully, but these errors were encountered: