google-java-format
google-java-format copied to clipboard
Formatter fails with Javadoc on import
The annotation is wrong for the Java file, but this is a compiling, small reproducing case. The following file complains about syntax errors:
package foo;
import groovy.transform.CompileStatic;
/**
* Created.
*/
import java.util.ArrayList;
/**
* Created.
*/
@CompileStatic
public class Broken {
ArrayList<?> list;
}
For posterity:
google-java-format T.java
T.java:error: Imports not contiguous (perhaps a comment separates them?)
i.e. https://github.com/google/google-java-format/blob/64242e17f5478eb07a2ca7e409382271765f2524/core/src/main/java/com/google/googlejavaformat/java/ImportOrderer.java#L81