Skip to content

Commit

Permalink
remove unnecessary local
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Oct 9, 2024
1 parent 18dd6b9 commit 5ded427
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nullaway/src/main/java/com/uber/nullaway/NullAway.java
Original file line number Diff line number Diff line change
Expand Up @@ -1550,11 +1550,10 @@ private void checkNullableAnnotationPositionInType(
if (!(type instanceof MemberSelectTree)) {
return;
}
MemberSelectTree fieldAccess = (MemberSelectTree) type;

// Get the end position of the outer type expression. Any nullable annotation before this
// position is considered to be on the outer type, which is incorrect.
int endOfOuterType = state.getEndPosition(fieldAccess.getExpression());
int endOfOuterType = state.getEndPosition(((MemberSelectTree) type).getExpression());
int startOfType = ((JCTree) type).getStartPosition();

for (AnnotationTree annotation : annotations) {
Expand Down

0 comments on commit 5ded427

Please sign in to comment.