aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/Parser.java
diff options
context:
space:
mode:
authorSaad Mohammad <[email protected]>2012-11-13 11:04:38 -0500
committerSaad Mohammad <[email protected]>2012-11-13 11:04:38 -0500
commit05dce02a240c914e9dba64cc0625a5e308cb16a0 (patch)
treebf432cf01b1e52381e07b5818a2d33c84a9d2708 /netx/net/sourceforge/jnlp/Parser.java
parent07debbc4fcc25b31d0231230ff2093926580129e (diff)
Fix PR1166: Embedded JNLP File is not supported in applet tag
Diffstat (limited to 'netx/net/sourceforge/jnlp/Parser.java')
-rw-r--r--netx/net/sourceforge/jnlp/Parser.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/netx/net/sourceforge/jnlp/Parser.java b/netx/net/sourceforge/jnlp/Parser.java
index d24c0fd..a825a5b 100644
--- a/netx/net/sourceforge/jnlp/Parser.java
+++ b/netx/net/sourceforge/jnlp/Parser.java
@@ -143,9 +143,16 @@ class Parser {
// JNLP tag information
this.spec = getVersion(root, "spec", "1.0+");
- this.codebase = addSlash(getURL(root, "codebase", base));
- if (this.codebase == null) // We only override it if it is not specified.
+
+ try {
+ this.codebase = addSlash(getURL(root, "codebase", base));
+ } catch (ParseException e) {
+ //If parsing fails, continue by overriding the codebase with the one passed in
+ }
+
+ if (this.codebase == null) // Codebase is overwritten if codebase was not specified in file or if parsing of it failed
this.codebase = codebase;
+
this.base = (this.codebase != null) ? this.codebase : base; // if codebase not specified use default codebase
fileLocation = getURL(root, "href", this.base);