From f436ae7a54a3781926f8c3c22be5f5efab6aaa29 Mon Sep 17 00:00:00 2001 From: Mark Sheppard Date: Fri, 12 Aug 2016 10:37:15 +0100 Subject: [PATCH] 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 | 3 --- 1 file changed, 3 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/net/URL.java b/jdk/src/java.base/share/classes/java/net/URL.java index 145cf29d001..b029b83d7ca 100644 --- a/jdk/src/java.base/share/classes/java/net/URL.java +++ b/jdk/src/java.base/share/classes/java/net/URL.java @@ -1556,9 +1556,6 @@ public final class URL implements java.io.Serializable { path = file; } - if (port == -1) { - port = 0; - } // Set the object fields. this.protocol = protocol; this.host = host;