--- old/src/java.base/share/classes/java/net/HostPortrange.java 2018-12-06 17:25:40.289283097 -0500 +++ new/src/java.base/share/classes/java/net/HostPortrange.java 2018-12-06 17:25:40.121282264 -0500 @@ -241,7 +241,7 @@ int[] parsePort(String port) { - if (port == null || port.equals("")) { + if (port == null || port.isEmpty()) { return defaultPort(); } @@ -260,13 +260,13 @@ String high = port.substring(dash+1); int l,h; - if (low.equals("")) { + if (low.isEmpty()) { l = PORT_MIN; } else { l = Integer.parseInt(low); } - if (high.equals("")) { + if (high.isEmpty()) { h = PORT_MAX; } else { h = Integer.parseInt(high);