Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Dec 23, 2023
1 parent 320e642 commit 8be8aaf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public NullnessHint onDataflowVisitMethodInvocation(
// assertThat(A).isInstanceOf(Foo.class)
// A will not be NULL after this statement.
if (methodNameUtil.isMethodIsNotNull(callee) || methodNameUtil.isMethodIsInstanceOf(callee)) {
AccessPath ap = getAccessPathForNotNullExpr(node, state, apContext);
AccessPath ap = getAccessPathForNotNullAssertThatExpr(node, state, apContext);
if (ap != null) {
bothUpdates.set(ap, NONNULL);
}
Expand Down Expand Up @@ -98,7 +98,7 @@ public NullnessHint onDataflowVisitMethodInvocation(
* @return the AccessPath for the argument of the assertThat() call, if present, otherwise {@code
* null}
*/
private @Nullable AccessPath getAccessPathForNotNullExpr(
private @Nullable AccessPath getAccessPathForNotNullAssertThatExpr(
MethodInvocationNode node, VisitorState state, AccessPath.AccessPathContext apContext) {
Node receiver = node.getTarget().getReceiver();
if (receiver instanceof MethodInvocationNode) {
Expand All @@ -109,7 +109,7 @@ public NullnessHint onDataflowVisitMethodInvocation(
return AccessPath.getAccessPathForNode(arg, state, apContext);
} else if (methodNameUtil.isMethodAssertJDescribedAs(receiver_symbol)) {
// For calls to as() or describedAs(), we recursively search for the assertThat() call
return getAccessPathForNotNullExpr(receiver_method, state, apContext);
return getAccessPathForNotNullAssertThatExpr(receiver_method, state, apContext);
}
}
return null;

Check warning on line 115 in nullaway/src/main/java/com/uber/nullaway/handlers/AssertionHandler.java

View check run for this annotation

Codecov / codecov/patch

nullaway/src/main/java/com/uber/nullaway/handlers/AssertionHandler.java#L115

Added line #L115 was not covered by tests
Expand Down

0 comments on commit 8be8aaf

Please sign in to comment.