aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/Parser.java
diff options
context:
space:
mode:
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);