Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Waibel2015-06-01 14:36:03 -0400
committerFlorian Waibel2015-06-01 14:36:03 -0400
commitd6196cba9568085a6d74f3de327fdebd8c217360 (patch)
tree5a752fac768563a9a36261861a9b8eaac39de321
parent78396af75d1ecc62ad3262a7a0d5db684e1f04aa (diff)
downloadorg.eclipse.virgo.kernel-d6196cba9568085a6d74f3de327fdebd8c217360.tar.gz
org.eclipse.virgo.kernel-d6196cba9568085a6d74f3de327fdebd8c217360.tar.xz
org.eclipse.virgo.kernel-d6196cba9568085a6d74f3de327fdebd8c217360.zip
Closes resource leak in JUnit test
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSTests.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSTests.java b/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSTests.java
index 80880df3..5a6199d6 100644
--- a/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSTests.java
+++ b/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSTests.java
@@ -115,7 +115,8 @@ public class JarFileArtifactFSTests {
@Test(expected = UnsupportedOperationException.class)
public void getDirectoryInputStream() throws IOException {
ArtifactFSEntry entry = this.artifactFS.getEntry("test/");
- entry.getInputStream();
+ try (InputStream dummy = entry.getInputStream()) {
+ }
}
@Test

Back to the top