Repository navigation
Conversation
…ng-keeps-conditional-stores
The default transfer function now merges the then-store and else-store of its input, which describe an earlier node. Only nodes whose input stores describe the node itself keep them: casts, markers, `&&`, `||`, `!`, ternary expressions, and return statements. This fixes unsoundness for `instanceof`, string concatenation, lambdas, array creation, and other node kinds that passed an operand's stores through. `==`, `!=`, `&`, `|`, and `^` derive their stores from a truth table, which also handles a constant operand. A boolean literal passes its input's stores along only when it is the right operand of such an operator, as determined from the CFG rather than the AST. JointJavacJavaParserVisitor: add asserts that the type checkers now need.
…al path is unchanged Annotate moreSpecificValue, which accepts and may return null.
…into unboxing-keeps-conditional-stores
Now that most nodes merge the then-store and else-store of their input, the method access in isNN(o).booleanValue() must pass them along to the unboxing call.
…s' into explicit-unboxing-keeps-conditional-stores
Subclasses such as NonEmptyTransfer refine a result's then-store and else-store in place, which requires two distinct stores.
…-keeps-conditional-stores
…s' into explicit-unboxing-keeps-conditional-stores
…lt transfer, skip merging equal stores
…s' into explicit-unboxing-keeps-conditional-stores
…into explicit-unboxing-keeps-conditional-stores
…into unboxing-keeps-conditional-stores
…s' into explicit-unboxing-keeps-conditional-stores
…k-branch-master into conditional-stores-of-operands
…h/types/checker-framework-fork-mernst-branch-conditional-stores-of-operands into unboxing-keeps-conditional-stores
…ng-keeps-conditional-stores
# Conflicts: # framework/src/main/java/org/checkerframework/framework/flow/CFAbstractTransfer.java
…ng-keeps-conditional-stores
…actory; pass a non-null else-store Since typetools#8607, the CFG does not mark an enhanced for loop's boxing or unboxing conversion with the iterable expression, so the branches are dead. Their tests and the UnboxingWeakens test checker move to typetools#8607. processPostconditions passes its store as both stores, because an unconditional postcondition refines only the then-store.
…s' into conditional-and-or-unboxing
…s' into conditional-and-or-unboxing
…ditional-stores # Conflicts: # docs/CHANGELOG.md
…nditional-stores # Conflicts: # framework/src/main/java/org/checkerframework/framework/type/AnnotatedTypeFactory.java
…lean Co-authored-by: Michael Ernst <mernst@cs.washington.edu>
mernst
added a commit
to mernst/checker-framework
that referenced
this pull request
Nov 29, 2026
…ression, which typetools#8520 implements
Member
Author
|
@coderabbitai review |
Contributor
Action performed
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Land after #8400.
Land before #8399.
The CFG now unboxes
Booleanoperands of&&and||, and aBooleanoperand of a conditional expression whose type isboolean, as inflag ? aBoolean : false, as it does in other unboxing contexts. Therefore, the Nullness Checker refines such an operand to non-null after the operand is evaluated. The new tests arechecker/tests/nullness/ConditionalAndOrUnboxing.javaandchecker/tests/nullness/ConditionalExpressionUnboxing.java.This pull request was split out of #8399, so that it need not wait for #8329. #8399 keeps the tests of operands whose type is a type variable bounded by
Boolean, which need #8329.🤖 Generated with Claude Code