Skip to content

Commit

Permalink
chore(deserialization-provider): Remove unnecessary switch block for …
Browse files Browse the repository at this point in the history
…only two codec types
  • Loading branch information
aivruu committed Jun 1, 2024
1 parent 3de7c7c commit bcb6943
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ public static class Builder {
if (this.jsonBody == null || this.codecType == null) {
throw new IllegalStateException("Json body or codec type for the deserialization have not been specified!");
}
return switch (this.codecType) {
case RELEASE, REPOSITORY -> GSON_PROVIDER.fromJson(this.jsonBody, this.codecType.typeClass());
};
// Should never be null because codec-type specified always is valid.
return GSON_PROVIDER.fromJson(this.jsonBody, this.codecType.typeClass());
}
}

Expand Down

0 comments on commit bcb6943

Please sign in to comment.