Mercurial > hg > release > icedtea-web-1.8
changeset 1254:01d833792fbd
(DummyJNLPFileWithJar) fixed accidentall call to getParentFile
author | Jiri Vanek <jvanek@redhat.com> |
---|---|
date | Mon, 22 Jun 2015 19:48:08 +0200 |
parents | 6f6aa0416960 |
children | 0c37c46e9e9b |
files | tests/test-extensions/net/sourceforge/jnlp/mock/DummyJNLPFileWithJar.java |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-extensions/net/sourceforge/jnlp/mock/DummyJNLPFileWithJar.java Mon Jun 22 16:44:52 2015 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/mock/DummyJNLPFileWithJar.java Mon Jun 22 19:48:08 2015 +0200 @@ -29,23 +29,24 @@ this(-1, jarFiles); } - public DummyJNLPFileWithJar(URL... jarFiles) throws MalformedURLException { - this(-1, jarFiles); + public DummyJNLPFileWithJar(URL codebaseRewritter, URL... jarFiles) throws MalformedURLException { + this(-1, codebaseRewritter, jarFiles); } public DummyJNLPFileWithJar(int main, File... jarFiles) throws MalformedURLException { - this(main, filesToUrls(jarFiles)); + this(main, jarFiles[0].getParentFile().toURI().toURL(), filesToUrls(jarFiles)); + } private static URL[] filesToUrls(File[] f) throws MalformedURLException{ URL[] r = new URL[f.length]; for (int i = 0; i < f.length; i++) { - r[i]=f[i].getParentFile().toURI().toURL(); + r[i]=f[i].toURI().toURL(); } return r; } - public DummyJNLPFileWithJar(int main, URL... jarFiles) throws MalformedURLException { - codeBase = jarFiles[0]; + public DummyJNLPFileWithJar(int main, URL codebaseRewritter, URL... jarFiles) throws MalformedURLException { + codeBase = codebaseRewritter; this.jarFiles = jarFiles; jarDescs = new JARDesc[jarFiles.length];