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 6121cf8 commit dd8e606Copy full SHA for dd8e606
src/test/java/org/scijava/io/handle/FileHandleTest.java
@@ -103,11 +103,10 @@ public void testNotCreatedByClose() throws IOException {
103
assertFalse(nonExistentFile.exists());
104
105
final FileLocation loc = new FileLocation(nonExistentFile);
106
- final DataHandle<?> handle = dhs.create(loc);
107
- assertTrue(handle instanceof FileHandle);
108
- assertFalse(handle.exists());
109
-
110
- handle.close();
+ try (final DataHandle<?> handle = dhs.create(loc)) {
+ assertTrue(handle instanceof FileHandle);
+ assertFalse(handle.exists());
+ }
111
112
}
113
0 commit comments