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
Hi team, case null, default -> is a common pattern in switch expressions (explicit null is required for compatibility with older switch statements). But it crashes the formatter, e.g. the code below results in /YourFile.java: com.palantir.javaformat.java.FormatterException: 48:13: error: expected token: 'default'; generated - instead -> [Help 1]
Splitting the case into two separated cases with identical bodies helps, but it's obviously a subpar workaround because it causes static analyzer warnings + prevents switching to palantir-java-formatter without migrating all affected switches in the codebase first.
Thanks !
The text was updated successfully, but these errors were encountered:
Hi team,
case null, default ->
is a common pattern in switch expressions (explicit null is required for compatibility with older switch statements). But it crashes the formatter, e.g. the code below results in/YourFile.java: com.palantir.javaformat.java.FormatterException: 48:13: error: expected token: 'default'; generated - instead -> [Help 1]
Splitting the case into two separated cases with identical bodies helps, but it's obviously a subpar workaround because it causes static analyzer warnings + prevents switching to palantir-java-formatter without migrating all affected switches in the codebase first.
Thanks !
The text was updated successfully, but these errors were encountered: