StatementSwitchToExpressionSwitch jdk17 doesn't work
Open
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
In this reproducer https://github.com/delanym/error-prone-reproducer
I took an example from https://errorprone.info/bugpattern/StatementSwitchToExpressionSwitch
``` java
enum Suit {HEARTS, CLUBS, SPADES, DIAMONDS};
private void foo(Suit suit) {
switch(suit) {
case HEARTS:
System.out.println("Red hearts");
case DIAMONDS:
System.out.println("Red diamonds");
case SPADES:
// Fall through
case DIAMONDS:
bar();
System.out.println("Black suit");
}
}
```
fixed the duplicate case (!), ran it through EP 2.18.0
with command `./mvnw`
and it didn't fail.
Contributor guide
Assessment
This issue has not been assessed yet.