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

potential null pointer dereference in DeviceRotation.java #8183

Closed
HermioneSW opened this issue Apr 9, 2020 · 5 comments
Closed

potential null pointer dereference in DeviceRotation.java #8183

HermioneSW opened this issue Apr 9, 2020 · 5 comments

Comments

@HermioneSW
Copy link

🐛 Bug Report

A clear and concise description of what the bug is.

In DeviceRotation.java (/java/client/src/org/openqa/selenium/DeviceRotation.java), line 52 DeviceRotation function when map is null at line 53, the if body will be executed which will trigger a bug in map.toString() at line 55.

To Reproduce

Detected by our static analysis tool.

Expected behavior

null pointer is not thrown

Test script or set of commands reproducing this issue

Again it's detected our static analysis algorithm

Environment

Any environment

We are developing a new static analysis tool for catching bugs in Java code. Would you please take a look and confirm this is indeed a bug? Thanks a million!!!

@ghost ghost added the needs-triaging label Apr 9, 2020
@HermioneSW HermioneSW changed the title potential null pointer dereference DeviceRotation.java potential null pointer dereference in DeviceRotation.java Apr 9, 2020
@HermioneSW
Copy link
Author

@AutomatedTester similar to the issue #8185, would you please double check this one as well.

@HermioneSW
Copy link
Author

@AutomatedTester and @barancev can either of you reopen issue and hopefully fix it. We believe the problem is similar to the issue #8185. Thanks so much!

@barancev
Copy link
Member

The issue has been fixed, see 92240ce and dd47b12

@HermioneSW
Copy link
Author

@barancev thanks!

@lock
Copy link

lock bot commented May 20, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants