JSR-352: Throw exceptions or use addSuppressed instead of logging them in finally blocks

Description

In the JSR-352 module, there are many places where the cleanup methods basically log any occurring exception. We should throw them instead.

In places where the resource to close is only used in one method, we should use try-with-resources.

In places where the resource to close is stored in a class attribute, this may a bit more difficult to implement when there are multiple resources to close, though. So we may want to introduce utils, similar to Guava's Closer class. See also HSEARCH-2640.

Environment

None

Status

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Priority

Critical