Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Aug 24, 2023
1 parent 5b46f06 commit 29902be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nullaway/src/main/java/com/uber/nullaway/ErrorBuilder.java
Expand Up @@ -203,6 +203,9 @@ private Description.Builder addSuggestedSuppression(
if (config.getCastToNonNullMethod() != null && canBeCastToNonNull(suggestTree)) {
builder = addCastToNonNullFix(suggestTree, builder);
} else {
// When there is a castToNonNull method, suggestTree is set to the expression to be
// casted, which is not suppressible. For simplicity, we just always recompute the
// suppressible node here.
Tree suppressibleNode = suppressibleNode(state.getPath());
if (suppressibleNode != null) {
builder = addSuppressWarningsFix(suppressibleNode, builder, suppressionName);
Expand Down

0 comments on commit 29902be

Please sign in to comment.