diff --git a/src/main/java/me/qeklydev/downloader/codec/DeserializationProvider.java b/src/main/java/me/qeklydev/downloader/codec/DeserializationProvider.java index 077e8be..53462c2 100644 --- a/src/main/java/me/qeklydev/downloader/codec/DeserializationProvider.java +++ b/src/main/java/me/qeklydev/downloader/codec/DeserializationProvider.java @@ -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()); } }