Skip to content

Commit 31cd9e1

Browse files
committed
Merge branch 'proxy-remotewebelement' of https://github.com/pujagani/appium-java-client into proxy-remotewebelement
2 parents fdbdadb + 08000fd commit 31cd9e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/io/appium/java_client/proxy/Helpers.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ public static <T> T createProxy(
148148

149149
listeners.stream()
150150
.filter(ProxyAwareListener.class::isInstance)
151-
.forEach(listener -> ((ProxyAwareListener) listener).attachProxyInstance(result));
151+
.map(ProxyAwareListener.class::cast)
152+
.forEach(listener -> listener.attachProxyInstance(result));
152153

153154
return result;
154155
} catch (SecurityException | ReflectiveOperationException e) {

0 commit comments

Comments
 (0)