Skip to content

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

Closed
Kui-Liu wants to merge 1 commit into
apache:masterfrom
Kui-Liu:master7
Closed

Fix the problem of instanceof test always return true.#2035
Kui-Liu wants to merge 1 commit into
apache:masterfrom
Kui-Liu:master7

Conversation

@Kui-Liu

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@Kui-Liu

Kui-Liu commented Oct 14, 2017

Copy link
Copy Markdown
Contributor Author

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