Skip to content

Commit

Permalink
Some feedback from yesterday ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Apr 9, 2022
1 parent 51a522d commit 9f7ddfa
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ private static Optional<Fix> tryMakeMethodCallMorePrecise(

private static String mayPrefixWithTypeArguments(
String preferredMethodName, MethodInvocationTree tree, Type cmpType, VisitorState state) {
int typeArguments = tree.getTypeArguments().size();
boolean methodNameIsComparing = preferredMethodName.equals("comparing");
int typeArgumentsCount = tree.getTypeArguments().size();
boolean methodNameIsComparing = "comparing".equals(preferredMethodName);

if (typeArguments == 0 || (typeArguments == 1 && !methodNameIsComparing)) {
if (typeArgumentsCount == 0 || (typeArgumentsCount == 1 && !methodNameIsComparing)) {
return preferredMethodName;
}

Expand Down

0 comments on commit 9f7ddfa

Please sign in to comment.