/hg/icedtea-web: 2 new changesets

jvanek at icedtea.classpath.org jvanek at icedtea.classpath.org
Wed Nov 28 11:19:09 UTC 2018


changeset 2739172a7702 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=2739172a7702
author: Jiri Vanek <jvanek at redhat.com>
date: Wed Nov 28 12:12:10 2018 +0100

	JNLPProxySelectorTest.java: fixed tests in (testConvertingProxyAutoConfigResultToProxyObject)


changeset ea49f60eaeef in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=ea49f60eaeef
author: Jiri Vanek <jvanek at redhat.com>
date: Wed Nov 28 12:13:07 2018 +0100

	OptionsDefinitions.java: (main) moved from ifelse to switch


diffstat:

 ChangeLog                                                               |   8 ++++
 netx/net/sourceforge/jnlp/OptionsDefinitions.java                       |  18 ++++++---
 tests/netx/unit/net/sourceforge/jnlp/runtime/JNLPProxySelectorTest.java |   4 +-
 3 files changed, 22 insertions(+), 8 deletions(-)

diffs (64 lines):

diff -r 2197d8c7c769 -r ea49f60eaeef ChangeLog
--- a/ChangeLog	Tue Nov 27 18:49:58 2018 +0100
+++ b/ChangeLog	Wed Nov 28 12:13:07 2018 +0100
@@ -1,3 +1,11 @@
+2018-11-27  Jiri Vanek <jvanek at redhat.com>
+
+	* netx/net/sourceforge/jnlp/OptionsDefinitions.java: (main) moved from ifelse to switch
+
+2018-11-27  Jiri Vanek <jvanek at redhat.com>
+
+	* tests/netx/unit/net/sourceforge/jnlp/runtime/JNLPProxySelectorTest.java: fixed tests in (testConvertingProxyAutoConfigResultToProxyObject)
+
 2018-11-27  Jiri Vanek <jvanek at redhat.com>
 
 	https is preffered only on default port
diff -r 2197d8c7c769 -r ea49f60eaeef netx/net/sourceforge/jnlp/OptionsDefinitions.java
--- a/netx/net/sourceforge/jnlp/OptionsDefinitions.java	Tue Nov 27 18:49:58 2018 +0100
+++ b/netx/net/sourceforge/jnlp/OptionsDefinitions.java	Wed Nov 28 12:13:07 2018 +0100
@@ -234,12 +234,18 @@
     }
 
     public static void main(String[] args) throws IOException {
-        if (args[0].equals(TextsProvider.JAVAWS)) {
-            printOptions(getJavaWsOptions());
-        } else if (args[0].equals(TextsProvider.ITWEB_SETTINGS)) {
-            printOptions(getItwsettingsCommands());
-        } else if (args[0].equals(TextsProvider.POLICY_EDITOR)) {
-            printOptions(getPolicyEditorOptions());
+        switch (args[0]) {
+            case TextsProvider.JAVAWS:
+                printOptions(getJavaWsOptions());
+                break;
+            case TextsProvider.ITWEB_SETTINGS:
+                printOptions(getItwsettingsCommands());
+                break;
+            case TextsProvider.POLICY_EDITOR:
+                printOptions(getPolicyEditorOptions());
+                break;
+            default:
+                break;
         }
     }
 
diff -r 2197d8c7c769 -r ea49f60eaeef tests/netx/unit/net/sourceforge/jnlp/runtime/JNLPProxySelectorTest.java
--- a/tests/netx/unit/net/sourceforge/jnlp/runtime/JNLPProxySelectorTest.java	Tue Nov 27 18:49:58 2018 +0100
+++ b/tests/netx/unit/net/sourceforge/jnlp/runtime/JNLPProxySelectorTest.java	Wed Nov 28 12:13:07 2018 +0100
@@ -312,7 +312,7 @@
 
         result = JNLPProxySelector.getProxiesFromPacResult("PROXY foo:42");
         assertEquals(1, result.size());
-        assertEquals(new Proxy(Type.HTTP, InetSocketAddress.createUnresolved("foo", 42)), result.get(0));
+        assertEquals(new Proxy(Type.HTTP, new InetSocketAddress("foo", 42)), result.get(0));
 
         result = JNLPProxySelector.getProxiesFromPacResult("PROXY foo:bar");
         assertEquals(0, result.size());
@@ -322,7 +322,7 @@
 
         result = JNLPProxySelector.getProxiesFromPacResult("SOCKS foo:42");
         assertEquals(1, result.size());
-        assertEquals(new Proxy(Type.SOCKS, InetSocketAddress.createUnresolved("foo", 42)), result.get(0));
+        assertEquals(new Proxy(Type.SOCKS,  new InetSocketAddress("foo", 42)), result.get(0));
 
         result = JNLPProxySelector.getProxiesFromPacResult("SOCKS foo:bar");
         assertEquals(0, result.size());


More information about the distro-pkg-dev mailing list