Skip to content

Commit

Permalink
checkerframework 3.26.0 (uber#671)
Browse files Browse the repository at this point in the history
Updates NullAway to use recently released [checkerframework 3.26.0](https://github.com/typetools/checker-framework/releases/tag/checker-framework-3.26.0) to resolve ABI breaks in checkerframework.

Closes uber#670

Co-authored-by: Manu Sridharan <[email protected]>
  • Loading branch information
schlosna and msridhar authored Oct 7, 2022
1 parent 6cd33ba commit 8b7c174
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if (project.hasProperty("epApiVersion")) {

def versions = [
asm : "9.3",
checkerFramework : "3.24.0",
checkerFramework : "3.26.0",
// for comparisons in other parts of the build
errorProneLatest : latestErrorProneVersion,
// The version of Error Prone used to check NullAway's code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ private static boolean hasPrimitiveType(Node node) {
}

private static boolean hasNonNullConstantValue(LocalVariableNode node) {
if (node.getElement() instanceof VariableElement) {
VariableElement element = (VariableElement) node.getElement();
VariableElement element = node.getElement();
if (element != null) {
return (element.getConstantValue() != null);
}
return false;
Expand All @@ -695,7 +695,8 @@ public TransferResult<Nullness, NullnessStore> visitLocalVariable(
}

private static boolean isCatchVariable(VariableDeclarationNode node) {
return elementFromDeclaration(node.getTree()).getKind() == EXCEPTION_PARAMETER;
VariableElement variableElement = elementFromDeclaration(node.getTree());
return variableElement != null && variableElement.getKind() == EXCEPTION_PARAMETER;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public NullnessStore widenedUpperBound(NullnessStore vNullnessStore) {
}

@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (!(o instanceof NullnessStore)) {
return false;
}
Expand Down

0 comments on commit 8b7c174

Please sign in to comment.