Skip to content

Commit f25c6ba

Browse files
committed
Polishing
1 parent c735eec commit f25c6ba

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

spring-web/src/main/java/org/springframework/http/converter/json/AbstractJsonHttpMessageConverter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ private Object readResolved(Type resolvedType, HttpInputMessage inputMessage)
104104
return readInternal(resolvedType, reader);
105105
}
106106
catch (Exception ex) {
107-
throw new HttpMessageNotReadableException("Could not read JSON document: " + ex.getMessage(), ex);
107+
throw new HttpMessageNotReadableException("Could not read JSON: " + ex.getMessage(), ex);
108108
}
109109
}
110110

@@ -120,7 +120,7 @@ protected final void writeInternal(Object o, Type type, HttpOutputMessage output
120120
writeInternal(o, type, writer);
121121
}
122122
catch (Exception ex) {
123-
throw new HttpMessageNotWritableException("Could not write JSON document: " + ex.getMessage(), ex);
123+
throw new HttpMessageNotWritableException("Could not write JSON: " + ex.getMessage(), ex);
124124
}
125125
writer.close();
126126
}

spring-web/src/test/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverterTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,7 +32,6 @@
3232
import org.springframework.http.MockHttpInputMessage;
3333
import org.springframework.http.MockHttpOutputMessage;
3434
import org.springframework.http.converter.AbstractHttpMessageConverter;
35-
import org.springframework.http.converter.HttpMessageNotReadableException;
3635
import org.springframework.http.converter.json.MappingJacksonValue;
3736

3837
import static org.hamcrest.CoreMatchers.*;

0 commit comments

Comments
 (0)