Skip to content

Commit

Permalink
rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Oct 7, 2024
1 parent 1364c2b commit d1d534d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions nullaway/src/main/java/com/uber/nullaway/NullAway.java
Original file line number Diff line number Diff line change
Expand Up @@ -1528,14 +1528,17 @@ private static boolean isDeclarationAnnotation(Symbol anno) {
}

private void handleNullabilityOnNestedClass(
List<? extends AnnotationTree> annotations, Tree type, Tree tree, VisitorState state) {
if (!(type instanceof JCTree.JCFieldAccess)) {
List<? extends AnnotationTree> annotations,
Tree typeTree,
Tree errorReportingTree,
VisitorState state) {
if (!(typeTree instanceof JCTree.JCFieldAccess)) {
return;
}
JCTree.JCFieldAccess fieldAccess = (JCTree.JCFieldAccess) type;
JCTree.JCFieldAccess fieldAccess = (JCTree.JCFieldAccess) typeTree;

int endOfOuterType = state.getEndPosition(fieldAccess.getExpression());
int startOfType = ((JCTree) type).getStartPosition();
int startOfType = ((JCTree) typeTree).getStartPosition();

for (AnnotationTree annotation : annotations) {
Symbol sym = ASTHelpers.getSymbol(annotation);
Expand Down Expand Up @@ -1564,7 +1567,8 @@ private void handleNullabilityOnNestedClass(
"Type-use nullability annotations should be applied on inner class");

state.reportMatch(
errorBuilder.createErrorDescription(errorMessage, buildDescription(tree), state, null));
errorBuilder.createErrorDescription(
errorMessage, buildDescription(errorReportingTree), state, null));
}
}
}
Expand Down

0 comments on commit d1d534d

Please sign in to comment.