[RFC][icedtea-web] Plugin doesn't halt when required elements from JNLP files are missing.

Jiri Vanek jvanek at redhat.com
Wed Jan 11 08:31:21 PST 2012

On 01/06/2012 08:08 PM, Danesh Dadachanji wrote:
> On 06/01/12 12:37 PM, Jiri Vanek wrote:
>> On 01/06/2012 05:44 PM, Danesh Dadachanji wrote:
>>> Hi,
>>> Looking at the plugin docs[1], <title> and <vendor> are required
>>> elements of <information>, without them the plugin should stop with a
>>> fatal error. Currently, icedtea-web just returns null from their
>>> respective getters and handles null accordingly. However it should not
>>> even reach that far. Here's a simple patch that throws a
>>> ParseException when not found.
>>> ChangeLog
>>> +2012-01-06 Danesh Dadachanji <ddadacha at redhat.com>
>>> +
>>> + Applications using JNLP files without a title or vendor section
>>> + still run, despite them being required elements.
>>> + * netx/net/sourceforge/jnlp/Parser.java:
>>> + (getInformationDesc): If title or vendor are not found in info,
>>> + a new ParseException is thrown.
>>> + * netx/net/sourceforge/jnlp/resources/Messages.properties: Add
>>> + PNoTitleElement and PNoVendorElement
>>> +
>>> Any comments? Is this okay for HEAD?
>>> Regards,
>>> Danesh
>>> [1]
>>> http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/developersguide/syntax.html
>> I do not like the idea of forcing somebody to have elements, when they
>> can be still empty. But if documentation say so.... How proprietary
>> plugin is dealing with it?
> It throws an exception, stopping further execution - the same as what this patch does for icedtea-web. =)
> If you'd like to test it, remove a title/vendor tag from a JNLP file and run it. You may need to with the java console being set to "Show console" - especially if it's an applet.
> Regards,
> Danesh

Jsut from couriosity - how does proprietary plugin is dealing when vendor or title is empty?
I still don't like the idea of  exiting when element is not present, but continue when element is empty :(

But specification is clear -  they are required and existence of content is not mentioned.

In that case I think it is ok for head. But please wait until branching is done.

Thanx for reading the specification :)

Regards J.

More information about the distro-pkg-dev mailing list