changeset 43199:e7fc78485b36

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 7fc878d49203
children ac8db82dab60
files jdk/src/java.base/share/classes/java/net/URL.java
diffstat 1 files changed, 0 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;