From fa3e9bdfddf6a35a7d79a879252ebd5c9171a268 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Mon, 6 Jun 2011 10:33:04 +0000 Subject: [PATCH] SPR-7439 - JSON (jackson) @RequestBody marshalling throws awkward exception --- .../converter/json/MappingJacksonHttpMessageConverter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.springframework.web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java b/org.springframework.web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java index ba1bf128f3..664299a56c 100644 --- a/org.springframework.web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java +++ b/org.springframework.web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java @@ -16,6 +16,7 @@ package org.springframework.http.converter.json; +import java.io.EOFException; import java.io.IOException; import java.nio.charset.Charset; import java.util.List; @@ -137,6 +138,9 @@ public class MappingJacksonHttpMessageConverter extends AbstractHttpMessageConve catch (JsonParseException ex) { throw new HttpMessageNotReadableException("Could not read JSON: " + ex.getMessage(), ex); } + catch (EOFException ex) { + throw new HttpMessageNotReadableException("Could not read JSON: " + ex.getMessage(), ex); + } } @Override