-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
antlrapprovedhas bountyissue has some money incentive to fix it, https://www.bountysource.com/teams/checkstyle/issuesissue has some money incentive to fix it, https://www.bountysource.com/teams/checkstyle/issuesnew feature
Milestone
Description
Running checkstyle validation on a class that contains switch expression:
return switch (c.getLocation().toLowerCase()) {
case "query" -> String.format("ARGS_GET:%s", c.getFullPath().get(0));
case "header" -> String.format("REQUEST_HEADERS:%s", c.getFullPath().get(0));
case "cookie" -> String.format("REQUEST_COOKIES:%s", c.getFullPath().get(0));
default -> "";
};
fails with:
unexpected token: switch
And also
expecting EOF, found 'case'
FIX Summary:
new Tokens are created. Syntax should be supported, Checks will be updated later on, See follow up issues.
see #8449 for more details
igorleal, robinjhector, schmee, arteam, markusjevringgoeuro and 30 more
Metadata
Metadata
Assignees
Labels
antlrapprovedhas bountyissue has some money incentive to fix it, https://www.bountysource.com/teams/checkstyle/issuesissue has some money incentive to fix it, https://www.bountysource.com/teams/checkstyle/issuesnew feature