aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
diff options
context:
space:
mode:
Diffstat (limited to 'netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java')
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java23
1 files changed, 5 insertions, 18 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
index 05f7622..273a46a 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
@@ -89,6 +89,7 @@ import net.sourceforge.jnlp.security.PluginAppVerifier;
import net.sourceforge.jnlp.security.SecurityDialogs;
import net.sourceforge.jnlp.tools.JarCertVerifier;
import net.sourceforge.jnlp.util.FileUtils;
+import net.sourceforge.jnlp.util.StreamUtils;
import sun.misc.JarIndex;
/**
@@ -1022,30 +1023,16 @@ public class JNLPClassLoader extends URLClassLoader {
} finally {
//Close all streams
- closeStream(inStream);
- closeStream(inputReader);
- closeStream(fr);
- closeStream(jnlpReader);
+ StreamUtils.closeSilently(inStream);
+ StreamUtils.closeSilently(inputReader);
+ StreamUtils.closeSilently(fr);
+ StreamUtils.closeSilently(jnlpReader);
}
if (JNLPRuntime.isDebug())
System.err.println("Ending check for signed JNLP file...");
}
- /***
- * Closes a stream
- *
- * @param stream the stream that will be closed
- */
- private void closeStream (Closeable stream) {
- if (stream != null)
- try {
- stream.close();
- } catch (Exception e) {
- e.printStackTrace(System.err);
- }
- }
-
/**
* Prompt the user for trust on all the signers that require approval.
* @throws LaunchException if the user does not approve every dialog prompt.