palantir-java-format
palantir-java-format copied to clipboard
Wrong indentation formatting multiple long method param annotations
What happened?
When formatting the following snippet, the method parameter annotations are not aligned. I.e. this is the formatting output using version 2.26.0:
interface MyClass {
MyCustomReturnType getReturnType(
@Nullable
@DoNotLog
@Request.Header(value = HttpHeaders.AUTHORIZATION, encoder = AuthHeaderParamEncoder.class)
AuthHeader authHeader);
}
What did you want to happen?
When breaking multiple param annotations into one line each, I would expect all annotations to have the same indentation level.
this was apparently intentional in google-java-format
https://github.com/google/google-java-format/issues/103