Skip to content

Commit

Permalink
Polishing a switch statement.
Browse files Browse the repository at this point in the history
See #3134
  • Loading branch information
shin-mallang authored and gregturn committed Sep 5, 2023
1 parent 358e4b5 commit b97efc9
Showing 1 changed file with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,12 @@ RevisionMetadata<?> createRevisionMetadata() {

private static RevisionMetadata.RevisionType convertRevisionType(RevisionType datum) {

switch (datum) {

case ADD:
return INSERT;
case MOD:
return UPDATE;
case DEL:
return DELETE;
default:
return UNKNOWN;
}
return switch (datum) {
case ADD -> INSERT;
case MOD -> UPDATE;
case DEL -> DELETE;
default -> UNKNOWN;
};
}
}

Expand Down

0 comments on commit b97efc9

Please sign in to comment.