Open findepi opened 2 years ago
This requires bumping minimal required Java version to 7.
of course, i've no idea whether this is an OK change for the project.
Thanks for the PR. This is a great idea; however, it's not feasible at the moment as we need to maintain Java 6 compatibility. As soon as global Java 6 usage decreases down to less than 1% (looks like it's currently at around 6%), we can consider bumping the version and adding this. I will leave this PR open until that time.
The next major release (3.X.X series) will drop support for Java 6. Support for try-with-resources will be added at that time.
I watched some Venkat Subramaniam videos.
He says rather than using try-with-resources, it is better to use a function with lamda in it. like: ClassName.use(something-> ...)
Beause many forget to use try as there is no compile time check for autoclosable.
Let the
SerialPort
implementAutoCloseable
. This requires bumping minimal required Java version to 7.