google / google/google-java-format
Unclear error messages for invisible whitespace
- Vorherrschende Sprache
- Java
- Sterne
- 6.2k
- Forks
- 937
- Ø Merge
- 6 Min.
- Gemergte PRs (30 T.)
- 3
Beschreibung
The following program with a zero width space after the `println` is executable but cannot not be formatted
```
public class Main {
public static void main(String[] args) {
System.out.println("hello");
}
}
```
```
% java -version
openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment Zulu19.30+11-CA (build 19.0.1+10)
OpenJDK 64-Bit Server VM Zulu19.30+11-CA (build 19.0.1+10, mixed mode, sharing)
% javac Main.java
% java Main
hello
% google-java-format --version
google-java-format: Version 1.17.0
% google-java-format Main.java
Main.java:3:10: error: expected token: 'println'; generated println instead
```
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.