Skip to content

Commit 8d12849

Browse files
committed
Use switch expression
1 parent fdd3c4b commit 8d12849

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

java/src/main/java/io/cucumber/cucumberexpressions/CucumberExpressionParser.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ public final class CucumberExpressionParser {
3737
private static final Parser textParser = (expression, tokens, current) -> {
3838
Token token = tokens.get(current);
3939
return switch (token.type) {
40-
case WHITE_SPACE, TEXT, END_PARAMETER, END_OPTIONAL ->
41-
new Result(1, new Node(TEXT_NODE, token.start(), token.end(), token.text));
40+
case WHITE_SPACE,
41+
TEXT,
42+
END_PARAMETER,
43+
END_OPTIONAL -> new Result(1, new Node(TEXT_NODE, token.start(), token.end(), token.text));
4244
case ALTERNATION -> throw createAlternationNotAllowedInOptional(expression, token);
4345
// If configured correctly this will never happen
4446
default -> new Result(0);

0 commit comments

Comments
 (0)