[rfc][icedtea-web] Fix for resolving name of versioned jar in JNLP
Adam Domurad
adomurad at redhat.com
Fri Jan 4 08:09:12 PST 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: versionedurlfix.patch
Type: text/x-patch
Size: 14614 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130104/0ae44891/versionedurlfix.patch
More information about the distro-pkg-dev
mailing list