From be41468c838666ded51437226e3668bb45043205 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Fri, 18 Dec 2020 19:49:28 +0000 Subject: [PATCH] 8258696: Temporarily revert use of pattern match instanceof until docs-reference is fixed Reviewed-by: rriggs, dcubed, bpb, jjg, dfuchs, aefimov --- .../share/classes/jdk/internal/net/http/HttpClientImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/HttpClientImpl.java b/src/java.net.http/share/classes/jdk/internal/net/http/HttpClientImpl.java index 2cc3c321d50..6687d9538b2 100644 --- a/src/java.net.http/share/classes/jdk/internal/net/http/HttpClientImpl.java +++ b/src/java.net.http/share/classes/jdk/internal/net/http/HttpClientImpl.java @@ -158,7 +158,8 @@ final class HttpClientImpl extends HttpClient implements Trackable { } private void shutdown() { - if (delegate instanceof ExecutorService service) { + if (delegate instanceof ExecutorService) { + ExecutorService service = (ExecutorService)delegate; PrivilegedAction action = () -> { service.shutdown(); return null;