Skip to content
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

Avoid NPE when DetoxServerUrl and DetoxSessionId are not set #666

Merged
merged 1 commit into from
Apr 14, 2018

Conversation

wiyarmir
Copy link
Contributor

By the JavaDocs of Detox.java, "If not set, then Detox tests are no ops. So it's safe to mix it with other tests."

However, this is not true, since the code will throw a NullPointerException and crash the tests. A simple nullcheck will avoid it.

As a side recommendation, the usage of nullability annotations helps catching this issues. Please consider adding them to the project. I am happy to do so if deemed acceptable.

Avoid NPE when DetoxServerUrl and DetoxSessionId are undefined
@wiyarmir wiyarmir requested a review from rotemmiz as a code owner April 10, 2018 15:07
@rotemmiz rotemmiz merged commit 9ee1723 into wix:master Apr 14, 2018
wiyarmir added a commit to Skyscanner/detox that referenced this pull request Apr 20, 2018
Avoid NPE when DetoxServerUrl and DetoxSessionId are undefined

(cherry picked from commit 9ee1723)
@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants