Skip to content

Fix a NullPointerException in RemoteWebDriver.getCurrentUrl#1327

Closed
ekuefler wants to merge 1 commit intoSeleniumHQ:masterfrom
ekuefler:npe-currenturl
Closed

Fix a NullPointerException in RemoteWebDriver.getCurrentUrl#1327
ekuefler wants to merge 1 commit intoSeleniumHQ:masterfrom
ekuefler:npe-currenturl

Conversation

@ekuefler
Copy link
Copy Markdown
Contributor

execute() is allowed to return null (see line 643), which will cause a
NullPointerException to be thrown in getCurrentUrl. This doesn't fix the
underlying problem, but it causes it to throw a WebDriverException
instead of a NullPointerException so the user can handle it in a
reasonable way.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also add || response.getValue() != null

@lukeis lukeis added the C-java Java Bindings label Dec 8, 2015
@lukeis
Copy link
Copy Markdown
Member

lukeis commented Dec 8, 2015

also can you confirm you've signed the CLA

execute() is allowed to return null (see line 643), which will cause a
NullPointerException to be thrown in getCurrentUrl. This doesn't fix the
underlying problem, but it causes it to throw a WebDriverException
instead of a NullPointerException so the user can handle it in a
reasonable way.
@ekuefler
Copy link
Copy Markdown
Contributor Author

Addressed comment. Yes, I've signed the CLA.

@lukeis
Copy link
Copy Markdown
Member

lukeis commented Dec 11, 2015

merged as d94c64f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-java Java Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants