Mercurial > hg > release > icedtea-web-1.6
changeset 1172:9caff6cc3aaa
Fixed locale tests
* tests/reproducers/simple/LocalesTest/testcases/LocalesTestTest.java : not existing BOHelp replaced by BOHelp1. (getProperties) if used classlaoder is null then system one is used.
author | Jiri Vanek <jvanek@redhat.com> |
---|---|
date | Tue, 10 Mar 2015 15:01:29 +0100 |
parents | 2306f922e936 |
children | ef028348584e |
files | ChangeLog tests/reproducers/simple/LocalesTest/testcases/LocalesTestTest.java |
diffstat | 2 files changed, 18 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Mar 10 13:06:51 2015 +0100 +++ b/ChangeLog Tue Mar 10 15:01:29 2015 +0100 @@ -1,3 +1,10 @@ +2015-03-10 Jiri Vanek <jvanek@redhat.com> + + Fixed locale tests + * tests/reproducers/simple/LocalesTest/testcases/LocalesTestTest.java : + not existing BOHelp replaced by BOHelp1. (getProperties) if used classlaoder + is null then system one is used. + 2015-03-10 Jiri Vanek <jvanek@redhat.com> Removed invalid URLs, empty codebases and enbaled js tests for opera
--- a/tests/reproducers/simple/LocalesTest/testcases/LocalesTestTest.java Tue Mar 10 13:06:51 2015 +0100 +++ b/tests/reproducers/simple/LocalesTest/testcases/LocalesTestTest.java Tue Mar 10 15:01:29 2015 +0100 @@ -36,6 +36,7 @@ */ import java.io.IOException; +import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -54,7 +55,7 @@ public class LocalesTestTest { - private static ServerAccess server = new ServerAccess(); + private static final ServerAccess server = new ServerAccess(); String[] keys = { "BOUsage", "BOUsage2", @@ -71,7 +72,7 @@ "BOViewer", "BXnofork", "BXclearcache", - "BOHelp"}; + "BOHelp1"}; /** * this will prepare new set of variables with wanted locale, which can be @@ -130,7 +131,14 @@ } public ResourceBundle getProperties(String s) throws IOException { - return new PropertyResourceBundle(this.getClass().getClassLoader().getResourceAsStream("net/sourceforge/jnlp/resources/Messages" + s + ".properties")); + ClassLoader cl = this.getClass().getClassLoader(); + ServerAccess.logOutputReprint(cl==null?"null":cl.toString()); + if (cl == null) { + cl = ClassLoader.getSystemClassLoader(); + ServerAccess.logOutputReprint(cl==null?"null":cl.toString()); + } + InputStream q = cl.getResourceAsStream("net/sourceforge/jnlp/resources/Messages" + s + ".properties"); + return new PropertyResourceBundle(q); } //just launching javaws -about to see if messages are corectly localised