[RFC][icedtea-web] Plugin doesn't halt when required elements from JNLP files are missing.
Omair Majid
omajid at redhat.com
Mon Mar 19 11:34:28 PDT 2012
On 03/19/2012 02:31 PM, Danesh Dadachanji wrote:
> On 16/03/12 07:35 PM, Omair Majid wrote:
>> On 03/14/2012 04:08 PM, Danesh Dadachanji wrote:
>>> + * netx/net/sourceforge/jnlp/Parser.java:
>>> + (getInformationDesc): If title or vendor are not found in info,
>>> + a new ParseException is thrown.
>>
>> There is something wrong here. Many unit tests contain snippets of jnlp
>> files that do not contain title or vendor tags. Those unit tests are
>> (mostly) still passing (by this, I mean a simple parse operation on them
>> succeeds). I see about 1 new failure where I was expecting tons.
>
> Thanks for the catch!
>
> Based on our conclusions on IRC, I'm only updating the one test that
> fails because of the changeset. Since every other unit test is using
> Parser directly, of which none call getInfo() or getInformationDesc()
> (both directly and indirectly), I think it's safe to let the other tests
> be. This will need to be changed if we ever muck around with Parser to
> enforce the JNLP rules.
>
>> Did I mention I prefer unit tests rather than integration tests for
>> checking corner cases? :)
>
> They definitely do beat the heck out of reproducers time-wise.
>
:)
> ChangeLog:
> +2012-03-19 Danesh Dadachanji <ddadacha at redhat.com>
> +
> + Fix failing unit test missing title/vendor tags in the JNLP stream.
> + * tests/netx/unit/net/sourceforge/jnlp/ParserCornerCases.java
> + (testNestedComments): Added title and vendor tags to malformedJnlp.
> +
>
Looks good to me.
Cheers,
Omair
More information about the distro-pkg-dev
mailing list