You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use GJF with JDK 16, I get the following error
Caused by: com.google.googlejavaformat.java.FormatterException: 8:52: error: expected token: 'sealed'; generated class instead
at com.google.googlejavaformat.java.Formatter.getFormatReplacements(Formatter.java:293)
at com.google.googlejavaformat.java.Formatter.formatSource(Formatter.java:267)
at com.google.googlejavaformat.java.Formatter.formatSource(Formatter.java:233)
... 135 more
I know sealed classes are still in preview though, so understand if this isn't expected to be supported yet. The error message is a little surprising though
The text was updated successfully, but these errors were encountered:
This implements support for JEP 409: Sealed Classes, see
https://openjdk.java.net/jeps/409.
The implementation handles the sealed and non-sealed keywords and sorts them
according to their JLS order. This requires us to look at the actual text of
the Tok, as there’s no TokenKind for sealed and non-sealed.
The optional permits clause is handled in the same manner as the implements
clause. A new private method, classDeclarationTypeList, has been added to
facilitate this.
This fixesgoogle#603.
When trying to use GJF with JDK 16, I get the following error
With this source code
I know sealed classes are still in preview though, so understand if this isn't expected to be supported yet. The error message is a little surprising though
The text was updated successfully, but these errors were encountered: