Skip to content

Commit fd21bc9

Browse files
graememorganError Prone Team
authored and
Error Prone Team
committed
Reflow a comment that didn't appreciate being formatted in unknown commit
PiperOrigin-RevId: 595108607
1 parent 63cf192 commit fd21bc9

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

core/src/main/java/com/google/errorprone/bugpatterns/PrimitiveArrayPassedToVarargsMethod.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,16 @@ public Description matchMethodInvocation(MethodInvocationTree t, VisitorState st
5050
}
5151

5252
/**
53-
* Assuming the argument in the varargs position is a single one of type int[], here is the truth
54-
* table: Param type Should return Why int... false Exact type match int[]... false Exact type
55-
* match for the array element type T... true Will cause boxing Object... true Will cause boxing
53+
* Assuming the argument in the varargs position is a single one of type {@code int[]}, here is
54+
* the truth table:
55+
*
56+
* <pre>
57+
* Param type Should return Why
58+
* int... false Exact type match
59+
* int[]... false Exact type match for the array element type
60+
* T... true Will cause boxing
61+
* Object... true Will cause boxing
62+
* </pre>
5663
*/
5764
private static boolean isVarargs(MethodInvocationTree tree, VisitorState state) {
5865
MethodSymbol symbol = ASTHelpers.getSymbol(tree);
@@ -62,7 +69,7 @@ private static boolean isVarargs(MethodInvocationTree tree, VisitorState state)
6269
return false;
6370
}
6471

65-
// Last param must be varags
72+
// Last param must be varargs
6673
List<VarSymbol> params = symbol.getParameters();
6774
int varargsPosition = params.size() - 1;
6875
ArrayType varargsParamType = (ArrayType) getLast(params).type;

0 commit comments

Comments
 (0)