Skip to content

Commit

Permalink
Address latest comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aldexis committed Dec 14, 2023
1 parent a623131 commit 4fe109d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 31 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@

package com.palantir.dialogue.annotations;

import com.palantir.conjure.java.dialogue.serde.DefaultConjureRuntime;
import com.palantir.conjure.java.dialogue.serde.Encodings;
import com.palantir.dialogue.BodySerDe;
import com.palantir.dialogue.Response;
import java.io.InputStream;

public final class InputStreamDeserializer extends StdDeserializer<InputStream> {

private static final BodySerDe DEFAULT_BODY_SERDE =
DefaultConjureRuntime.builder().encodings(Encodings.json()).build().bodySerDe();

private final BodySerDe bodySerDe;

public InputStreamDeserializer() {
this(Constants.DEFAULT_BODY_SERDE);
this(DEFAULT_BODY_SERDE);
}

public InputStreamDeserializer(BodySerDe bodySerDe) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.fasterxml.jackson.databind.ObjectWriter;
import com.palantir.conjure.java.dialogue.serde.DefaultConjureRuntime;
import com.palantir.conjure.java.dialogue.serde.Encoding;
import com.palantir.conjure.java.dialogue.serde.Encodings;
import com.palantir.dialogue.BodySerDe;
import com.palantir.dialogue.TypeMarker;
import com.palantir.logsafe.Preconditions;
Expand All @@ -39,10 +40,13 @@
*/
public final class Json implements DeserializerFactory<Object>, SerializerFactory<Object> {

private static final BodySerDe DEFAULT_BODY_SERDE =
DefaultConjureRuntime.builder().encodings(Encodings.json()).build().bodySerDe();

private final BodySerDe bodySerDe;

public Json() {
this(Constants.DEFAULT_BODY_SERDE);
this(DEFAULT_BODY_SERDE);
}

public Json(ObjectMapper mapper) {
Expand Down

0 comments on commit 4fe109d

Please sign in to comment.