-
Notifications
You must be signed in to change notification settings - Fork 418
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
jline3 example should close Terminal (using try-with-resource or try-finally) #1168
Comments
Yes, looking at some Terminal implementations it seems quite important that Thank you for pointing this out! |
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. |
A PR would be really great! That module ( Thanks as always for your help! |
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: