[rfc][icedtea-web] Fix for resolving name of versioned jar in JNLP

Jiri Vanek jvanek at redhat.com
Wed Jan 30 04:15:42 PST 2013


On 01/04/2013 05:09 PM, Adam Domurad wrote:
> Hi all. This fixes a bug in the versioning of jars, described here
> http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/avoidingUnnecessaryUpdateChecks.html
> .
>
> This bug prevented Spring jars such as j2-org.springframework.beans.jar from downloading with the
> proper versioned name when I looked into problems with the JNLP game 'ADOM2'.
> Eg, j2-org.springframework.beans.jar with version 1.0
> expected: j2-org.springframework.beans__V1.0.jar
> result: j2-org__V1.0.springframework.beans.jar
>
> The fix was easy, however I have added a few extra tests because this part of the code did not seem
> to be under test (please do inform me if it is tested somewhere).
> The specific problem is tested in the unit-test ResourceUrlCreatorTest.testVersionWithPeriods
>
> 2013-01-04  Adam Domurad  <adomurad at redhat.com>
>
>      Fix for resolving name of versioned jar in JNLP.
>      * netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java
>      (getUrl): Fix versioning of jar names that have periods, eg
>      'foo.bar.jar'. Make method static for testing.
>      * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceUrlCreatorTest.java:
>      New, test version & pack URL encoding.
>      * tests/reproducers/simple/VersionedJar__V1/resources/VersionedJarDisabled.jnlp:
>      New, tries to use versioned jar with versioning not turned on.
>      * tests/reproducers/simple/VersionedJar__V1/resources/VersionedJarEnabled.jnlp:
>      New, tries to use versioned jar with versioning turned on.
>      * tests/reproducers/simple/VersionedJar__V1/srcs/VersionedJar.java:
>      New, prints simple message.
>      * tests/reproducers/simple/VersionedJar__V1/testcases/VersionedJarTest.java:
>      New, tests if VersionedJar has ran only with versioning turned on.
>
> Happy hacking,
> -Adam

Yap, I think it can go to head. And I will be for 1.3 after some time in head to.
Also I think it is worthy of NEWS record.

J.




More information about the distro-pkg-dev mailing list