Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Mazursky2013-08-28 03:58:56 +0000
committerGerrit Code Review @ Eclipse.org2013-09-09 04:24:31 +0000
commit767faece5c4692748d1ac8e130b2e4c5faa1ff20 (patch)
tree787e93c5bf452b69d28d737a04d57cddae0b7ede /jetty-deploy/src
parentcdd95bb5515f35af090bcbcf6f9af03d5c6762c9 (diff)
downloadorg.eclipse.jetty.project-767faece5c4692748d1ac8e130b2e4c5faa1ff20.tar.gz
org.eclipse.jetty.project-767faece5c4692748d1ac8e130b2e4c5faa1ff20.tar.xz
org.eclipse.jetty.project-767faece5c4692748d1ac8e130b2e4c5faa1ff20.zip
[Bug 415999] Fix some of FindBugs warnings
Mostly not closed streams/DB resources are fixed. But also less important things. Signed-off-by: Mikhail Mazursky <mikhail.mazursky@gmail.com>
Diffstat (limited to 'jetty-deploy/src')
-rw-r--r--jetty-deploy/src/test/java/org/eclipse/jetty/deploy/test/XmlConfiguredJetty.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/test/XmlConfiguredJetty.java b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/test/XmlConfiguredJetty.java
index a14facc8e7..6f9790ec71 100644
--- a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/test/XmlConfiguredJetty.java
+++ b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/test/XmlConfiguredJetty.java
@@ -24,6 +24,7 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.io.OutputStream;
import java.net.InetAddress;
import java.net.MalformedURLException;
import java.net.URI;
@@ -123,8 +124,10 @@ public class XmlConfiguredJetty
// Write out configuration for use by ConfigurationManager.
File testConfig = new File(_jettyHome, "xml-configured-jetty.properties");
- FileOutputStream out = new FileOutputStream(testConfig);
- properties.store(out,"Generated by " + XmlConfiguredJetty.class.getName());
+ try (OutputStream out = new FileOutputStream(testConfig))
+ {
+ properties.store(out,"Generated by " + XmlConfiguredJetty.class.getName());
+ }
for (Object key:properties.keySet())
setProperty(String.valueOf(key),String.valueOf(properties.get(key)));
}

Back to the top