Skip to content

Fix the problem of instanceof test always return true. #2035

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

Closed
wants to merge 1 commit into from
Closed

Fix the problem of instanceof test always return true. #2035

wants to merge 1 commit into from

Conversation

Kui-Liu
Copy link
Contributor

@Kui-Liu Kui-Liu commented Oct 13, 2017

This instanceof test will always return true because AbstractSObjectBase is the return type of method node.getObject().
The return value of method node.getObject() might be null, it would be better to do a null test rather than an instanceof test.
http://findbugs.sourceforge.net/bugDescriptions.html#BC_VACUOUS_INSTANCEOF

This instanceof test will always return true because AbstractSObjectBase is the return type of method node.getObject().
 The return value of method node.getObject() might be null, it would be better to do a null test rather than an instanceof test.
http://findbugs.sourceforge.net/bugDescriptions.html#BC_VACUOUS_INSTANCEOF
@davsclaus
Copy link
Contributor

Thanks for the PR it has been merged. Do you mind closing this?

@Kui-Liu
Copy link
Contributor Author

Kui-Liu commented Oct 14, 2017

Thanks.

@Kui-Liu Kui-Liu closed this Oct 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants