From 274f43f75ed5dd66a8375f1dfd2ed2ba5396a09c Mon Sep 17 00:00:00 2001 From: mk868 Date: Mon, 14 Oct 2024 07:53:37 +0200 Subject: [PATCH] [java] Fix `v*Network.java` conditions (#14585) Co-authored-by: Puja Jagani --- java/src/org/openqa/selenium/devtools/v127/v127Network.java | 2 +- java/src/org/openqa/selenium/devtools/v128/v128Network.java | 2 +- java/src/org/openqa/selenium/devtools/v129/v129Network.java | 2 +- java/src/org/openqa/selenium/devtools/v85/V85Network.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/java/src/org/openqa/selenium/devtools/v127/v127Network.java b/java/src/org/openqa/selenium/devtools/v127/v127Network.java index d430a582b2358..769c646c40e7b 100644 --- a/java/src/org/openqa/selenium/devtools/v127/v127Network.java +++ b/java/src/org/openqa/selenium/devtools/v127/v127Network.java @@ -127,7 +127,7 @@ public Either createSeMessages(RequestPaused pausedRe } catch (DevToolsException e) { // Redirects don't seem to have bodies int code = pausedReq.getResponseStatusCode().orElse(HTTP_OK); - if (code < 300 && code > 399) { + if (code >= 300 && code <= 399) { LOG.warning("Unable to get body for request id " + pausedReq.getRequestId()); } diff --git a/java/src/org/openqa/selenium/devtools/v128/v128Network.java b/java/src/org/openqa/selenium/devtools/v128/v128Network.java index e333a026dfc64..ccbdcee9426f3 100644 --- a/java/src/org/openqa/selenium/devtools/v128/v128Network.java +++ b/java/src/org/openqa/selenium/devtools/v128/v128Network.java @@ -127,7 +127,7 @@ public Either createSeMessages(RequestPaused pausedRe } catch (DevToolsException e) { // Redirects don't seem to have bodies int code = pausedReq.getResponseStatusCode().orElse(HTTP_OK); - if (code < 300 && code > 399) { + if (code >= 300 && code <= 399) { LOG.warning("Unable to get body for request id " + pausedReq.getRequestId()); } diff --git a/java/src/org/openqa/selenium/devtools/v129/v129Network.java b/java/src/org/openqa/selenium/devtools/v129/v129Network.java index 41c76f9897c46..21651783d74cf 100644 --- a/java/src/org/openqa/selenium/devtools/v129/v129Network.java +++ b/java/src/org/openqa/selenium/devtools/v129/v129Network.java @@ -127,7 +127,7 @@ public Either createSeMessages(RequestPaused pausedRe } catch (DevToolsException e) { // Redirects don't seem to have bodies int code = pausedReq.getResponseStatusCode().orElse(HTTP_OK); - if (code < 300 && code > 399) { + if (code >= 300 && code <= 399) { LOG.warning("Unable to get body for request id " + pausedReq.getRequestId()); } diff --git a/java/src/org/openqa/selenium/devtools/v85/V85Network.java b/java/src/org/openqa/selenium/devtools/v85/V85Network.java index da12dbe42802d..c4bc0df6219ce 100644 --- a/java/src/org/openqa/selenium/devtools/v85/V85Network.java +++ b/java/src/org/openqa/selenium/devtools/v85/V85Network.java @@ -137,7 +137,7 @@ public Either createSeMessages(RequestPaused pausedRe } catch (DevToolsException e) { // Redirects don't seem to have bodies int code = pausedReq.getResponseStatusCode().orElse(HTTP_OK); - if (code < 300 && code > 399) { + if (code >= 300 && code <= 399) { LOG.warning("Unable to get body for request id " + pausedReq.getRequestId()); }