8161228: URL objects with custom protocol handlers have port changed after deserializing
authormsheppar
Fri, 12 Aug 2016 10:37:15 +0100
changeset 43199 e7fc78485b36
parent 43198 7fc878d49203
child 43200 ac8db82dab60
8161228: URL objects with custom protocol handlers have port changed after deserializing Reviewed-by: chegar, rriggs, coffeys
jdk/src/java.base/share/classes/java/net/URL.java
--- a/jdk/src/java.base/share/classes/java/net/URL.java	Fri Aug 12 10:20:13 2016 +0800
+++ b/jdk/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;