Skip to content

Commit

Permalink
Replace switch with ThreeSides::valueOf
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Dupuy <[email protected]>
  • Loading branch information
flo-dup committed Nov 23, 2023
1 parent 8396236 commit 63c38df
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,7 @@ private static ThreeSides toThreeSides(Integer side) {
if (side == null) {
return null;
}
return switch (side) {
case 1 -> ThreeSides.ONE;
case 2 -> ThreeSides.TWO;
case 3 -> ThreeSides.THREE;
default -> null;
};
return ThreeSides.valueOf(side);
}

private static LimitViolationType toLimitViolationType(String kind) {
Expand Down

0 comments on commit 63c38df

Please sign in to comment.