@ -172,7 +172,7 @@ public class BufferedImageHttpMessageConverter implements HttpMessageConverter<B
@@ -172,7 +172,7 @@ public class BufferedImageHttpMessageConverter implements HttpMessageConverter<B
@ -184,7 +184,8 @@ public class BufferedImageHttpMessageConverter implements HttpMessageConverter<B
@@ -184,7 +184,8 @@ public class BufferedImageHttpMessageConverter implements HttpMessageConverter<B
}
else{
thrownewHttpMessageNotReadableException(
"Could not find javax.imageio.ImageReader for Content-Type ["+contentType+"]");
"Could not find javax.imageio.ImageReader for Content-Type ["+contentType+"]",
@ -113,7 +113,8 @@ public class ObjectToStringHttpMessageConverter extends AbstractHttpMessageConve
@@ -113,7 +113,8 @@ public class ObjectToStringHttpMessageConverter extends AbstractHttpMessageConve
@ -97,7 +97,7 @@ public class ResourceHttpMessageConverter extends AbstractHttpMessageConverter<R
@@ -97,7 +97,7 @@ public class ResourceHttpMessageConverter extends AbstractHttpMessageConverter<R
@ -78,7 +78,7 @@ public abstract class AbstractWireFeedHttpMessageConverter<T extends WireFeed>
@@ -78,7 +78,7 @@ public abstract class AbstractWireFeedHttpMessageConverter<T extends WireFeed>
return(T)feedInput.build(reader);
}
catch(FeedExceptionex){
thrownewHttpMessageNotReadableException("Could not read WireFeed: "+ex.getMessage(),ex);
thrownewHttpMessageNotReadableException("Could not read WireFeed: "+ex.getMessage(),ex,inputMessage);
@ -242,7 +242,7 @@ public abstract class AbstractJackson2HttpMessageConverter extends AbstractGener
@@ -242,7 +242,7 @@ public abstract class AbstractJackson2HttpMessageConverter extends AbstractGener
@ -109,7 +109,7 @@ public abstract class AbstractJsonHttpMessageConverter extends AbstractGenericHt
@@ -109,7 +109,7 @@ public abstract class AbstractJsonHttpMessageConverter extends AbstractGenericHt
returnreadInternal(resolvedType,reader);
}
catch(Exceptionex){
thrownewHttpMessageNotReadableException("Could not read JSON: "+ex.getMessage(),ex);
thrownewHttpMessageNotReadableException("Could not read JSON: "+ex.getMessage(),ex,inputMessage);
@ -273,12 +273,13 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
@@ -273,12 +273,13 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
@ -311,7 +312,7 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
@@ -311,7 +312,7 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
@ -320,14 +321,14 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
@@ -320,14 +321,14 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
@ -339,7 +340,7 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
@@ -339,7 +340,7 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
this.htmlFormatter.print(message,output,charset);
}
else{
thrownewHttpMessageNotWritableException(
thrownewHttpMessageConversionException(
"protobuf-java-format does not support printing "+contentType);
}
}
@ -374,21 +375,21 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
@@ -374,21 +375,21 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
@ -396,7 +397,7 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
@@ -396,7 +397,7 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
writer.flush();
}
else{
thrownewHttpMessageNotWritableException(
thrownewHttpMessageConversionException(
"protobuf-java-util does not support printing "+contentType);
@ -62,14 +64,31 @@ public abstract class AbstractXmlHttpMessageConverter<T> extends AbstractHttpMes
@@ -62,14 +64,31 @@ public abstract class AbstractXmlHttpMessageConverter<T> extends AbstractHttpMes
thrownewHttpMessageNotWritableException("Could not marshal ["+t+"]: "+ex.getMessage(),ex);
}
}
/**
@ -89,21 +108,17 @@ public abstract class AbstractXmlHttpMessageConverter<T> extends AbstractHttpMes
@@ -89,21 +108,17 @@ public abstract class AbstractXmlHttpMessageConverter<T> extends AbstractHttpMes
@ -132,7 +132,7 @@ public class Jaxb2CollectionHttpMessageConverter<T extends Collection>
@@ -132,7 +132,7 @@ public class Jaxb2CollectionHttpMessageConverter<T extends Collection>
// should not be called, since we return false for canRead(Class)
thrownewUnsupportedOperationException();
}
@ -160,18 +160,20 @@ public class Jaxb2CollectionHttpMessageConverter<T extends Collection>
@@ -160,18 +160,20 @@ public class Jaxb2CollectionHttpMessageConverter<T extends Collection>
}
else{
// should not happen, since we check in canRead(Type)
thrownewHttpMessageNotReadableException("Cannot unmarshal to ["+elementClass+"]");
thrownewHttpMessageNotReadableException(
"Cannot unmarshal to ["+elementClass+"]",inputMessage);
}
event=moveToNextElement(streamReader);
}
returnresult;
}
catch(XMLStreamExceptionex){
thrownewHttpMessageNotReadableException("Failed to read XML stream: "+ex.getMessage(),ex);
thrownewHttpMessageNotReadableException(
"Failed to read XML stream: "+ex.getMessage(),ex,inputMessage);
}
catch(UnmarshalExceptionex){
thrownewHttpMessageNotReadableException(
"Could not unmarshal to ["+elementClass+"]: "+ex.getMessage(),ex);
"Could not unmarshal to ["+elementClass+"]: "+ex.getMessage(),ex,inputMessage);
@ -237,7 +239,7 @@ public class Jaxb2CollectionHttpMessageConverter<T extends Collection>
@@ -237,7 +239,7 @@ public class Jaxb2CollectionHttpMessageConverter<T extends Collection>
@ -124,7 +121,7 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa
@@ -124,7 +121,7 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa
@ -138,13 +135,13 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa
@@ -138,13 +135,13 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa
}
catch(NullPointerExceptionex){
if(!isSupportDtd()){
thrownewHttpMessageNotReadableException("NPE while unmarshalling. "+
thrownewIllegalStateException("NPE while unmarshalling. "+
"This can happen due to the presence of DTD declarations which are disabled.",ex);
}
throwex;
}
catch(UnmarshalExceptionex){
thrownewHttpMessageNotReadableException("Could not unmarshal to ["+clazz+"]: "+ex.getMessage(),ex);
@ -177,7 +174,7 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa
@@ -177,7 +174,7 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa
@ -185,7 +182,7 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa
@@ -185,7 +182,7 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa
marshaller.marshal(o,result);
}
catch(MarshalExceptionex){
thrownewHttpMessageNotWritableException("Could not marshal ["+o+"]: "+ex.getMessage(),ex);
@ -125,28 +120,19 @@ public class MarshallingHttpMessageConverter extends AbstractXmlHttpMessageConve
@@ -125,28 +120,19 @@ public class MarshallingHttpMessageConverter extends AbstractXmlHttpMessageConve
@ -212,7 +212,7 @@ public abstract class AbstractMessageConverterMethodArgumentResolver implements
@@ -212,7 +212,7 @@ public abstract class AbstractMessageConverterMethodArgumentResolver implements
}
}
catch(IOExceptionex){
thrownewHttpMessageNotReadableException("I/O error while reading input message",ex);
thrownewHttpMessageNotReadableException("I/O error while reading input message",ex,inputMessage);
@ -157,7 +157,7 @@ public class RequestResponseBodyMethodProcessor extends AbstractMessageConverter
@@ -157,7 +157,7 @@ public class RequestResponseBodyMethodProcessor extends AbstractMessageConverter