This java code causes the formatter to throw an exception:
Minimal testcase:
@Test
public void formatsEmptyEnums() throws FormatterException {
String input = "public enum Empty{;}";
List<String> expectedLines = asList("public enum Empty {", " ;", "}", "");
assertEquals(Joiner.on("\n").join(expectedLines), new Formatter().formatSource(input));
}
Fails with the following stacktrace:
com.google.googlejavaformat.java.FormatterException: 1:2: error: expected token: ';'; generated } instead
at com.google.googlejavaformat.java.Formatter.getFormatReplacements(Formatter.java:260)
at com.google.googlejavaformat.java.Formatter.formatSource(Formatter.java:234)
at com.google.googlejavaformat.java.Formatter.formatSource(Formatter.java:202)
Tested against 1.6-SNAPSHOT at 579772a
This java code causes the formatter to throw an exception:
Minimal testcase:
Fails with the following stacktrace:
Tested against 1.6-SNAPSHOT at 579772a