Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Oct 6, 2023
1 parent a8e3dc7 commit e5bb4a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions java/src/org/openqa/selenium/remote/http/RetryRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import dev.failsafe.RetryPolicy;
import dev.failsafe.event.ExecutionAttemptedEvent;
import dev.failsafe.function.CheckedFunction;

import java.net.ConnectException;
import java.util.logging.Logger;
import org.openqa.selenium.TimeoutException;
Expand All @@ -40,8 +39,10 @@ public class RetryRequest implements Filter {

private static final Logger LOG = Logger.getLogger(RetryRequest.class.getName());

private static final Fallback<HttpResponse> fallback = Fallback.of(
(CheckedFunction<ExecutionAttemptedEvent<? extends HttpResponse>, ? extends HttpResponse>) RetryRequest::getFallback);
private static final Fallback<HttpResponse> fallback =
Fallback.of(
(CheckedFunction<ExecutionAttemptedEvent<? extends HttpResponse>, ? extends HttpResponse>)
RetryRequest::getFallback);

// Retry on connection error.
private static final RetryPolicy<HttpResponse> connectionFailurePolicy =
Expand Down Expand Up @@ -106,8 +107,7 @@ private static HttpResponse getFallback(
.setStatus(HTTP_GATEWAY_TIMEOUT)
.setContent(
asJson(ImmutableMap.of("value", ImmutableMap.of("message", "Read timeout"))));
} else
throw exception;
} else throw exception;
} else if (executionAttemptedEvent.getLastResult() != null) {
HttpResponse response = executionAttemptedEvent.getLastResult();
if ((response.getStatus() == HTTP_INTERNAL_ERROR
Expand Down

0 comments on commit e5bb4a1

Please sign in to comment.