aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayedAppProviderTest.java')
-rw-r--r--jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayedAppProviderTest.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayedAppProviderTest.java b/jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayedAppProviderTest.java
index 9a5ed71793..bdb9addb13 100644
--- a/jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayedAppProviderTest.java
+++ b/jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayedAppProviderTest.java
@@ -20,6 +20,7 @@ package org.eclipse.jetty.overlays;
import java.io.File;
import java.io.FileOutputStream;
+import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Set;
@@ -577,9 +578,10 @@ public class OverlayedAppProviderTest
try
{
IO.delete(file);
- FileOutputStream out = new FileOutputStream(file,false);
- out.write("<h1>Hello</h1>".getBytes());
- out.close();
+ try (OutputStream out = new FileOutputStream(file,false))
+ {
+ out.write("<h1>Hello</h1>".getBytes());
+ }
}
catch(Exception e)
{