Polishing

This commit is contained in:
Juergen Hoeller 2017-05-07 22:59:25 +02:00
parent c735eec08b
commit f25c6ba9bc
2 changed files with 3 additions and 4 deletions

View File

@ -104,7 +104,7 @@ public abstract class AbstractJsonHttpMessageConverter extends AbstractGenericHt
return readInternal(resolvedType, reader);
}
catch (Exception ex) {
throw new HttpMessageNotReadableException("Could not read JSON document: " + ex.getMessage(), ex);
throw new HttpMessageNotReadableException("Could not read JSON: " + ex.getMessage(), ex);
}
}
@ -120,7 +120,7 @@ public abstract class AbstractJsonHttpMessageConverter extends AbstractGenericHt
writeInternal(o, type, writer);
}
catch (Exception ex) {
throw new HttpMessageNotWritableException("Could not write JSON document: " + ex.getMessage(), ex);
throw new HttpMessageNotWritableException("Could not write JSON: " + ex.getMessage(), ex);
}
writer.close();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -32,7 +32,6 @@ import org.springframework.http.MediaType;
import org.springframework.http.MockHttpInputMessage;
import org.springframework.http.MockHttpOutputMessage;
import org.springframework.http.converter.AbstractHttpMessageConverter;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.http.converter.json.MappingJacksonValue;
import static org.hamcrest.CoreMatchers.*;