8259631: Reapply pattern match instanceof use in HttpClientImpl

Reviewed-by: dfuchs, chegar
This commit is contained in:
Aleksei Efimov 2021-01-14 11:57:48 +00:00
parent 3462f7a918
commit b040a3d7a9

View File

@ -158,8 +158,7 @@ final class HttpClientImpl extends HttpClient implements Trackable {
}
private void shutdown() {
if (delegate instanceof ExecutorService) {
ExecutorService service = (ExecutorService)delegate;
if (delegate instanceof ExecutorService service) {
PrivilegedAction<?> action = () -> {
service.shutdown();
return null;