changeset 16507:3aa456bf29a4

8161228: URL objects with custom protocol handlers have port changed after deserializing Reviewed-by: chegar, rriggs, coffeys
author msheppar
date Fri, 12 Aug 2016 10:37:15 +0100
parents 3623d9c08bda
children e42ed4c98eb6
files src/java.base/share/classes/java/net/URL.java
diffstat 1 files changed, 0 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/net/URL.java	Fri Aug 12 10:20:13 2016 +0800
+++ b/src/java.base/share/classes/java/net/URL.java	Fri Aug 12 10:37:15 2016 +0100
@@ -1556,9 +1556,6 @@
                 path = file;
         }
 
-        if (port == -1) {
-            port = 0;
-        }
         // Set the object fields.
         this.protocol = protocol;
         this.host = host;