From 68ad9845aa917b960e2bd37088a617fad521c324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sautter?= Date: Wed, 3 Apr 2024 17:15:10 +0200 Subject: [PATCH] [grid] do not create unused HttpResponse instances --- .../openqa/selenium/grid/web/RoutableHttpClientFactory.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/java/src/org/openqa/selenium/grid/web/RoutableHttpClientFactory.java b/java/src/org/openqa/selenium/grid/web/RoutableHttpClientFactory.java index 44a21c5c5fef6..d3576bd9f922e 100644 --- a/java/src/org/openqa/selenium/grid/web/RoutableHttpClientFactory.java +++ b/java/src/org/openqa/selenium/grid/web/RoutableHttpClientFactory.java @@ -56,9 +56,8 @@ public HttpClient createClient(ClientConfig config) { return new HttpClient() { @Override public HttpResponse execute(HttpRequest request) throws UncheckedIOException { - HttpResponse response = new HttpResponse(); - if (!handler.test(request)) { + HttpResponse response = new HttpResponse(); response.setStatus(404); response.setContent( asJson(