File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
src/main/java/uk/gov/hmcts/probate/client Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,9 @@ public String bodyToString() {
3737 }
3838
3939 public ErrorResponse mapToErrorResponse () {
40- ObjectMapper mapper = new ObjectMapper ();
4140 ErrorResponse errorResponse = null ;
4241 try {
43- errorResponse = mapper .readValue (this .bodyToString (), ErrorResponse .class );
42+ errorResponse = this . objectMapper .readValue (this .bodyToString (), ErrorResponse .class );
4443 } catch (IOException e ) {
4544 log .debug ("Response contained empty body" );
4645 }
Original file line number Diff line number Diff line change 11package uk .gov .hmcts .probate .client .business ;
22
3+ import com .fasterxml .jackson .core .JsonGenerator ;
34import com .fasterxml .jackson .databind .DeserializationFeature ;
45import com .fasterxml .jackson .databind .ObjectMapper ;
56import com .fasterxml .jackson .databind .SerializationFeature ;
@@ -20,6 +21,7 @@ Encoder feignEncoder() {
2021 ObjectMapper objectMapper = new ObjectMapper ();
2122 objectMapper .enable (SerializationFeature .WRAP_ROOT_VALUE );
2223 objectMapper .enable (DeserializationFeature .UNWRAP_ROOT_VALUE );
24+ objectMapper .disable (JsonGenerator .Feature .AUTO_CLOSE_JSON_CONTENT );
2325 return new JacksonEncoder (objectMapper );
2426 }
2527
You can’t perform that action at this time.
0 commit comments