Skip to content

Commit fa3e9bd

Browse files
committed
SPR-7439 - JSON (jackson) @RequestBody marshalling throws awkward exception
1 parent 4f1e748 commit fa3e9bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

org.springframework.web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package org.springframework.http.converter.json;
1818

19+
import java.io.EOFException;
1920
import java.io.IOException;
2021
import java.nio.charset.Charset;
2122
import java.util.List;
@@ -137,6 +138,9 @@ protected Object readInternal(Class<?> clazz, HttpInputMessage inputMessage)
137138
catch (JsonParseException ex) {
138139
throw new HttpMessageNotReadableException("Could not read JSON: " + ex.getMessage(), ex);
139140
}
141+
catch (EOFException ex) {
142+
throw new HttpMessageNotReadableException("Could not read JSON: " + ex.getMessage(), ex);
143+
}
140144
}
141145

142146
@Override

0 commit comments

Comments
 (0)