We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b52332e commit eaa0eb4Copy full SHA for eaa0eb4
src/test/java/org/scijava/io/DataHandleTest.java
@@ -64,12 +64,14 @@ public void testDataHandle() throws IOException {
64
context.service(DataHandleService.class);
65
66
final Location loc = createLocation();
67
- final DataHandle<? extends Location> handle = dataHandleService.create(loc);
68
- assertEquals(getExpectedHandleType(), handle.getClass());
+ try (final DataHandle<? extends Location> handle = //
+ dataHandleService.create(loc))
69
+ {
70
+ assertEquals(getExpectedHandleType(), handle.getClass());
71
- checkReads(handle);
- checkWrites(handle);
72
- handle.close();
+ checkReads(handle);
73
+ checkWrites(handle);
74
+ }
75
}
76
77
// -- DataHandleTest methods --
0 commit comments