Translate EOF to HttpMessageNotReadableException
The MappingJacksonHttpMessageConverter now catches all IOException types raised while reading JSON and translates them into HttpMessageNotReadableException. Issue: SPR-9238
This commit is contained in:
@@ -148,7 +148,7 @@ public class MappingJackson2HttpMessageConverter extends AbstractHttpMessageConv
|
||||
try {
|
||||
return this.objectMapper.readValue(inputMessage.getBody(), javaType);
|
||||
}
|
||||
catch (JsonProcessingException ex) {
|
||||
catch (IOException ex) {
|
||||
throw new HttpMessageNotReadableException("Could not read JSON: " + ex.getMessage(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ public class MappingJacksonHttpMessageConverter extends AbstractHttpMessageConve
|
||||
try {
|
||||
return this.objectMapper.readValue(inputMessage.getBody(), javaType);
|
||||
}
|
||||
catch (JsonProcessingException ex) {
|
||||
catch (IOException ex) {
|
||||
throw new HttpMessageNotReadableException("Could not read JSON: " + ex.getMessage(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user