Skip to content

Commit 1894a47

Browse files
refactor: amend getIntervalWithPollingStrategy in AppiumFluentWait
1 parent 928ec44 commit 1894a47

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/main/java/io/appium/java_client/AppiumFluentWait.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,9 @@ private <V> void handleTimeoutException(Throwable lastException, Function<? supe
275275
private Duration getIntervalWithPollingStrategy(Instant start, long iterationNumber) {
276276
var interval = getInterval();
277277
return Optional.ofNullable(pollingStrategy)
278-
.map(strategy -> {
279-
final var info = new IterationInfo(
280-
iterationNumber,
281-
Duration.between(start, getClock().instant()), getTimeout(), interval);
282-
return strategy.apply(info);
283-
})
278+
.map(strategy -> strategy.apply(new IterationInfo(
279+
iterationNumber,
280+
Duration.between(start, getClock().instant()), getTimeout(), interval)))
284281
.orElse(interval);
285282
}
286283

0 commit comments

Comments
 (0)