v1.5.1 - Only tryClose if not null

This commit is contained in:
Frank van der Heijden 2020-06-27 12:29:58 +02:00
parent 0f641e115c
commit c9fceaac0d
No known key found for this signature in database
GPG key ID: 26DA56488D314D11
2 changed files with 2 additions and 1 deletions

View file

@ -41,6 +41,7 @@ public class CloseableResult implements Closeable {
* Attempts to close the closable, essentially wrapping it with try-catch.
*/
public void tryClose() {
if (closeable == null) return;
try {
close();
} catch (IOException ex) {