-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add methods to KiwiIO that can "close" any object (#1176)
* Add: CloseableResource - a record that describes a resource/object that can be closed. * Add: List<String> defaultCloseMethodNames - returns a list of default method names we'll try when closing an object. * Add: void closeObjectQuietly(Object object) - closes any object, including CloseableResource, using default close method names * Add: void closeObjectQuietly(String closeMethodName, Object object) - closes an object, excluding CloseableResource, using an explicit method name * Add: void closeObjectsQuietly(Object... objects) - closes one or more objects, including CloseableResource, using default close method names * Add: void closeObjectsQuietly(String closeMethodName, Object... objects) - closes one or more objects, excluding CloseableResource, using an explicit method name * Add: void closeResourceQuietly(CloseableResource closeableResource) - closes an object described by the CloseableResource * Fix: test involving XMLStreamWriter that should have tested a "clean" close (no exception thrown) * Enhance tests using mocks by adding verifications Closes #1162 Closes #1177
- Loading branch information
1 parent
ff30117
commit 0bd415b
Showing
2 changed files
with
591 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.