--- a/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java Fri Mar 01 17:40:16 2019 +0000
+++ b/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java Fri Mar 01 18:28:44 2019 +0000
@@ -209,10 +209,14 @@
}
}
- private void doTunneling(HttpURLConnection conn) {
+ private void doTunneling(HttpURLConnection conn) throws IOException {
try {
doTunneling.invoke(conn);
} catch (ReflectiveOperationException x) {
+ Throwable cause = x.getCause();
+ if (cause instanceof IOException) {
+ throw (IOException) cause;
+ }
throw new InternalError("Should not reach here", x);
}
}