Closed
Description
Consider the following code, which has been formatted with google-java-format version 1.5:
public class ArrayVsVarargs {
void anArrayParam1(String[] arg) {}
void varargsParam1(String... arg) {}
void anArrayParam2(String @Nullable [] arg) {}
void varargsParam2(String @Nullable... arg) {}
}
In the first two methods, when there are no type annotations, google-java-format is consistent about putting no space between the element type and the array indicator []
or ...
.
When there is a type annotation, google-java-format is inconsistent about the following space: it puts space before []
but no space bofore ...
.
I think that google-java-format should be consistent, and should always put spaces on both sides of a type annotation.
This is how it worked in version 1.3, so it would be nice to revert to that behavior.
Metadata
Metadata
Assignees
Labels
No labels