Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Fails to detect indirect null check in conditional expression #12

Closed
emsod opened this issue Dec 7, 2015 · 1 comment
Closed

Fails to detect indirect null check in conditional expression #12

emsod opened this issue Dec 7, 2015 · 1 comment

Comments

@emsod
Copy link
Contributor

emsod commented Dec 7, 2015

This test case fails:

int f(@nullable String p) {
if (false == (p != null)) {
return 0;
}
return p.size();
}

llbit added a commit to llbit/simplecfg that referenced this issue Dec 22, 2015
Improved the nullness testing for equality expressions when the left or right
hand side is a constant boolean expression. Added tests for all combintations
of true/false in left and right hand side and all non-null/null when
true/false conditions.

fixes google#12
llbit added a commit to llbit/simplecfg that referenced this issue Dec 22, 2015
Improved the nullness testing for equality expressions when the left or right
hand side is a constant boolean expression. Added tests for all combintations
of true/false in left and right hand side and all non-null/null when
true/false conditions.

fixes google#12
@llbit
Copy link
Contributor

llbit commented Dec 22, 2015

Made a pull request with a fix for this issue. See pull request #16

@emsod emsod closed this as completed in 21605ee Dec 28, 2015
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