Skip to content

Commit 8aae888

Browse files
committed
revert API change in AppiumExecutionMethod
I've restored the original signature of `ExecuteMethod` in Selenium 4.24.0-SNAPSHOT (will come with next nightly build).
1 parent 3739995 commit 8aae888

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package io.appium.java_client;
1818

19+
import org.jspecify.annotations.NonNull;
1920
import org.jspecify.annotations.Nullable;
2021
import org.openqa.selenium.remote.ExecuteMethod;
2122
import org.openqa.selenium.remote.Response;
@@ -37,8 +38,7 @@ public AppiumExecutionMethod(AppiumDriver driver) {
3738
* @return a command execution result
3839
*/
3940
@Nullable
40-
@SuppressWarnings("unchecked")
41-
public <T> T execute(String commandName, @Nullable Map<String, ?> parameters) {
41+
public Object execute(@NonNull String commandName, @Nullable Map<String, ?> parameters) {
4242
Response response;
4343

4444
if (parameters == null || parameters.isEmpty()) {
@@ -47,6 +47,6 @@ public <T> T execute(String commandName, @Nullable Map<String, ?> parameters) {
4747
response = driver.execute(commandName, parameters);
4848
}
4949

50-
return (T) response.getValue();
50+
return response.getValue();
5151
}
5252
}

0 commit comments

Comments
 (0)