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

Danesh Dadachanji ddadacha at redhat.com
Mon Mar 19 11:31:53 PDT 2012


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.
+


Cheers,
Danesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: title-vendor-required-unit-test-update-01.patch
Type: text/x-patch
Size: 824 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120319/acd47b7a/title-vendor-required-unit-test-update-01.patch 


More information about the distro-pkg-dev mailing list