Skip to content

Commit

Permalink
rename and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Oct 30, 2024
1 parent dab6f07 commit c2747a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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 @@ -1854,8 +1854,7 @@ private Description handleInvocation(
GenericsChecks.compareGenericTypeParameterNullabilityForCall(
formalParams, actualParams, varArgsMethod, this, state);
if (!methodSymbol.getTypeParameters().isEmpty()) {
GenericsChecks.checkInstantiationForGenericMethodCalls(
tree, state, this, config, handler);
GenericsChecks.checkGenericMethodCallTypeArguments(tree, state, this, config, handler);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,16 @@ private static boolean[] getTypeParamsWithNullableUpperBound(
}

/**
* Checks instantiated generic arguments of generic method calls. {@code @Nullable} types can only
* be used for type variables that have a {@code @Nullable} upper bound.
* Checks validity of type arguments at a generic method call. A {@code @Nullable} type argument
* can only be used for a type variable that has a {@code @Nullable} upper bound.
*
* @param tree the tree representing the instantiated type
* @param state visitor state
* @param analysis the analysis object
* @param config the analysis config
* @param handler the handler instance
*/
public static void checkInstantiationForGenericMethodCalls(
public static void checkGenericMethodCallTypeArguments(
Tree tree, VisitorState state, NullAway analysis, Config config, Handler handler) {
List<? extends Tree> typeArguments = ((MethodInvocationTree) tree).getTypeArguments();
if (typeArguments.isEmpty()) {
Expand Down

0 comments on commit c2747a9

Please sign in to comment.