aboutsummaryrefslogtreecommitdiffstats
path: root/netx
diff options
context:
space:
mode:
Diffstat (limited to 'netx')
-rw-r--r--netx/net/sourceforge/jnlp/JNLPFile.java29
-rw-r--r--netx/net/sourceforge/jnlp/PluginBridge.java2
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java6
3 files changed, 10 insertions, 27 deletions
diff --git a/netx/net/sourceforge/jnlp/JNLPFile.java b/netx/net/sourceforge/jnlp/JNLPFile.java
index f8c953e..a48ed7e 100644
--- a/netx/net/sourceforge/jnlp/JNLPFile.java
+++ b/netx/net/sourceforge/jnlp/JNLPFile.java
@@ -20,7 +20,6 @@ import static net.sourceforge.jnlp.runtime.Translator.R;
import java.io.IOException;
import java.io.InputStream;
-import java.io.Reader;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
@@ -791,29 +790,17 @@ public class JNLPFile {
}
/**
- * XXX: this method does a "==" comparison between the input JARDesc and
- * jars it finds through getResourcesDescs(). If ever the implementation
- * of that function should change to return copies of JARDescs objects,
- * then the "jar == aJar" comparison below should change accordingly.
- * @param jar the jar whose download options to get.
- * @return the download options.
+ * @return the download options to use for downloading jars listed in this jnlp file.
*/
- public DownloadOptions getDownloadOptionsForJar(JARDesc jar) {
+ public DownloadOptions getDownloadOptions() {
boolean usePack = false;
boolean useVersion = false;
- ResourcesDesc[] descs = getResourcesDescs();
- for (ResourcesDesc desc: descs) {
- JARDesc[] jars = desc.getJARs();
- for (JARDesc aJar: jars) {
- if (jar == aJar) {
- if (Boolean.valueOf(desc.getPropertiesMap().get("jnlp.packEnabled"))) {
- usePack = true;
- }
- if (Boolean.valueOf(desc.getPropertiesMap().get("jnlp.versionEnabled"))) {
- useVersion = true;
- }
- }
- }
+ ResourcesDesc desc = getResources();
+ if (Boolean.valueOf(desc.getPropertiesMap().get("jnlp.packEnabled"))) {
+ usePack = true;
+ }
+ if (Boolean.valueOf(desc.getPropertiesMap().get("jnlp.versionEnabled"))) {
+ useVersion = true;
}
return new DownloadOptions(usePack, useVersion);
}
diff --git a/netx/net/sourceforge/jnlp/PluginBridge.java b/netx/net/sourceforge/jnlp/PluginBridge.java
index 4f4c8f1..51c22a1 100644
--- a/netx/net/sourceforge/jnlp/PluginBridge.java
+++ b/netx/net/sourceforge/jnlp/PluginBridge.java
@@ -228,7 +228,7 @@ public class PluginBridge extends JNLPFile {
* {@inheritDoc }
*/
@Override
- public DownloadOptions getDownloadOptionsForJar(JARDesc jar) {
+ public DownloadOptions getDownloadOptions() {
return new DownloadOptions(usePack, useVersion);
}
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
index a74f541..4efa435 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
@@ -626,7 +626,7 @@ public class JNLPClassLoader extends URLClassLoader {
tracker.addResource(jars[i].getLocation(),
jars[i].getVersion(),
- getDownloadOptionsForJar(jars[i]),
+ file.getDownloadOptions(),
jars[i].isCacheable() ? JNLPRuntime.getDefaultUpdatePolicy() : UpdatePolicy.FORCE
);
}
@@ -1966,10 +1966,6 @@ public class JNLPClassLoader extends URLClassLoader {
}
}
- private DownloadOptions getDownloadOptionsForJar(JARDesc jar) {
- return file.getDownloadOptionsForJar(jar);
- }
-
/**
* Returns a set of paths that indicate the Class-Path entries in the
* manifest file. The paths are rooted in the same directory as the