google-java-format
google-java-format copied to clipboard
Formatting failure with zero-width space
Test case:
package test;
import com.google.common.util.concurrent.AtomicLongMap;
class Foo {
AtomicLongMap<String> a = AtomicLongMap.create().getAndIncrement("foo");
}
Error:
src/Test.java:6:30: error: expected token: 'getAndIncrement'; generated getAndIncrement instead
Version:
google-java-format --version google-java-format: Version 1.6
If nothing else the formatter should be reported a better diagnostic here, but there's a zero-width space in that example getAndIncrement<200b>("foo"), which is disallowed by the style guide.
Removing that character should allow the file to be formatted successfully.