Skip to content

Java: Nullness library: track instanceof expressions in correlated conditions#2412

Merged
aschackmull merged 7 commits intogithub:masterfrom
criemen:nullness-corr-cond
Nov 26, 2019
Merged

Java: Nullness library: track instanceof expressions in correlated conditions#2412
aschackmull merged 7 commits intogithub:masterfrom
criemen:nullness-corr-cond

Conversation

@criemen
Copy link
Collaborator

@criemen criemen commented Nov 21, 2019

This fixes a FP on apache kafka, see #2238 .
@aschackmull

@criemen criemen requested a review from a team as a code owner November 21, 2019 17:40
Copy link
Contributor

@aschackmull aschackmull left a comment

Choose a reason for hiding this comment

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

A few opportunities for simplification.
Also, do you have an example of a FP occurring in some project that the addition of correlated conditions of the form v1 == v2 fixes? I'm curious about the motivation for that addition. Sorry, I just noticed you pointed to such a FP on the issue.

@criemen
Copy link
Collaborator Author

criemen commented Nov 22, 2019

Thanks for the review, I addressed everything and renamed varComparisonExpr to varEqualityTestExpr.
I don't have a FP for ==, only for != but I included it both for completeness and to handle the !(a == b) case.

aschackmull
aschackmull previously approved these changes Nov 25, 2019
Copy link
Contributor

@aschackmull aschackmull left a comment

Choose a reason for hiding this comment

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

LGTM. Will merge once the CI comes back green.

@aschackmull
Copy link
Contributor

The autoformat check on java/ql/src/semmle/code/java/dataflow/Nullness.qll failed.

@aschackmull aschackmull merged commit 18e1708 into github:master Nov 26, 2019
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