--- old/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java 2016-08-13 00:09:44.839425700 +0530 +++ new/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java 2016-08-13 00:09:43.768318600 +0530 @@ -1074,7 +1074,7 @@ * 1) if (instProxy != null) * connect to instProxy; raise exception if failed * 2) else use system default ProxySelector - * 3) is 2) fails, make direct connection + * 3) else make a direct connection if ProxySelector is not present */ if (instProxy == null) { // no instance Proxy is set @@ -1117,10 +1117,7 @@ if (p != Proxy.NO_PROXY) { sel.connectFailed(uri, p.address(), ioex); if (!it.hasNext()) { - // fallback to direct connection - http = getNewHttpClient(url, null, connectTimeout, false); - http.setReadTimeout(readTimeout); - break; + throw ioex; } } else { throw ioex;