~ubuntu-branches/ubuntu/raring/icedtea-web/raring

« back to all changes in this revision

Viewing changes to netx/net/sourceforge/jnlp/Parser.java

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-02-04 18:19:46 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20120204181946-jngobgzz4mlen9yl
Tags: 1.2~pre1-0ubuntu1
* Update to hg 20120203, taken from the icedtea-web-1.2 release branch.
* Build separate plugin packages for OpenJDK 6 and OpenJDK 7, needed
  to provide the path to the runtime and the mime description in the plugin.
* Use icedtea-<jre version>-plugin as the name for both plugin packages.
* Remove icedtea-web-1.1.4-npapi-fix.patch, fixed upstream.
* Pass -n to gzip when compressing manpages to be Multi-Arch: same safe.
* Build multiarch packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
     * @throws ParseException if the JNLP file is invalid
111
111
     */
112
112
    public Parser(JNLPFile file, URL base, Node root, boolean strict, boolean allowExtensions) throws ParseException {
 
113
        this(file, base, root, strict, allowExtensions, null);
 
114
    }
 
115
 
 
116
    /**
 
117
     * Create a parser for the JNLP file.  If the location
 
118
     * parameters is not null it is used as the default codebase
 
119
     * (does not override value of jnlp element's href
 
120
     * attribute).<p>
 
121
     *
 
122
     * The root node may be normalized as a side effect of this
 
123
     * constructor.
 
124
     *
 
125
     * @param file the (uninitialized) file reference
 
126
     * @param base if codebase is not specified, a default base for relative URLs
 
127
     * @param root the root node
 
128
     * @param strict whether to enforce strict compliance with the JNLP spec
 
129
     * @param allowExtensions whether to allow extensions to the JNLP spec
 
130
     * @param codebase codebase to use if we did not parse one from JNLP file.
 
131
     * @throws ParseException if the JNLP file is invalid
 
132
     */
 
133
    public Parser(JNLPFile file, URL base, Node root, boolean strict, boolean allowExtensions, URL codebase) throws ParseException {
113
134
        this.file = file;
114
135
        this.root = root;
115
136
        this.strict = strict;
122
143
        // JNLP tag information
123
144
        this.spec = getVersion(root, "spec", "1.0+");
124
145
        this.codebase = addSlash(getURL(root, "codebase", base));
125
 
        this.base = (codebase != null) ? codebase : base; // if codebase not specified use default codebase
 
146
        if (this.codebase == null) // We only override it if it is not specified.
 
147
            this.codebase = codebase;
 
148
        this.base = (this.codebase != null) ? this.codebase : base; // if codebase not specified use default codebase
126
149
        fileLocation = getURL(root, "href", this.base);
127
150
 
128
151
        // normalize the text nodes