Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GJF intellij plugin does not format files with Java 14 switch expressions #455

Closed
abrudin opened this issue Apr 15, 2020 · 2 comments
Closed

Comments

@abrudin
Copy link

abrudin commented Apr 15, 2020

When using a Java 14 switch expression in a Java source file (for example a badly formatted one like):

final TestEnum te = TestEnum.TEST1;
    final String s = switch (te) {
          case TEST1 -> "hej";
              case TEST2 -> "nej";
      };

the file does not get formatted at all when using the google-java-format plugin, whereas files without this kind of expressions work flawlessly.

This issue is present in Intellij 2020.1 with the latest google-java-format 1.7.0.5.

There was no exceptions and I found no logs, Ctrl-Alt-L just said that there was no lines changed, code already properly formatted. I tried launching Intellij with Java 14 as well, but to no avail.

@sormuras
Copy link
Contributor

sormuras commented Apr 15, 2020

Related to #436 ... which is already solved on master via 4ddb914 ... but not yet packaged in the IJ IDEA plugin.

@cushon
Copy link
Collaborator

cushon commented Apr 26, 2020

#436

@cushon cushon closed this as completed Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants