Use try-with-resource
Pattern to avoid resource leaks, in particular in case exceptions are thrown when resources are used.
See https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html
This will eliminate the respective warnings that are shown since the migration to Photon.
(from redmine: issue id 3568, created on 2018-11-06, closed on 2018-11-13)
- Relations:
- parent #3538 (closed)