# HG changeset patch # User msheppar # Date 1470994635 -3600 # Node ID e7fc78485b367905afbebff87043f2509549b7d2 # Parent 7fc878d49203c331c8c7507142ffcd4c84975191 8161228: URL objects with custom protocol handlers have port changed after deserializing Reviewed-by: chegar, rriggs, coffeys diff -r 7fc878d49203 -r e7fc78485b36 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;