-
Notifications
You must be signed in to change notification settings - Fork 870
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
Code with sealed interfaces can not be formatted #697
Comments
The stack trace indicates that JDK 11 is being used here. |
You're right, the formatter itself was running on JDK 11 because that is the version IntelliJ runs on. While JetBrains provides JDK 17 for IntelliJ I wasn't able to start the IDE following this configuration approach. It looks like I have to wait for a future IntelliJ release running on JDK 17 out of the box to use the Java Formatter with Java 17. Since JetBrains is very conservative with using new JDKs to run IntelliJ on, I don't expect the Google Java Formatter working properly with Java 17 code before autumn 2023 (two years after release of JDK 17, the update to JDK 11 was also two years after release). |
Relationship to #533? |
IntelliJ 2022.3 includes Java 17. So upgrading to that should fix this issue. Please leave a comment if it doesn't. |
When trying to reformat code using the Google Java Format IntelliJ plugin, I get the following error:
The text was updated successfully, but these errors were encountered: