-
-
Notifications
You must be signed in to change notification settings - Fork 760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#655 FIX #682
#655 FIX #682
Conversation
public AppiumCommandExecutor(Map<String, CommandInfo> additionalCommands, | ||
URL addressOfRemoteServer, HttpClient.Factory httpClientFactory) { | ||
super(additionalCommands, addressOfRemoteServer, httpClientFactory); | ||
service = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be a reason of unexpected NPE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then it might be useful to mark the property as Nullable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or make it optional (I'd prefer this option)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mykola-mokhnach ok. I will improve it soon.
How about having some unit test to verify resulting capabilities structure? |
I think we don't need for these tests:
@Override public Response execute(Command command) throws IOException, WebDriverException {
...
return super.execute(command);
...
}
Our tests which run some AppiumDriver are successful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
response.setSessionId(command.getSessionId().toString()); | ||
@Override public Response execute(Command command) throws WebDriverException { | ||
if (DriverCommand.NEW_SESSION.equals(command.getName())) { | ||
ofNullable(service).ifPresent(driverService -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the code will be simpler if we make the service variable itself of type Optional
} | ||
|
||
return new WebDriverException("The appium server has accidentally died!", rootCause); | ||
}).orElse(new WebDriverException(rootCause.getMessage(), rootCause)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably, orElseGet ?
@mykola-mokhnach There is another one improvement. |
Change list
#655 FIX
Types of changes
Details
io.appium.java_client.remote.AppiumCommandExecutor
was rolled back.It is breaking change because it is compatible with appium server > v1.6.5