|
21 | 21 | import java.lang.reflect.Method;
|
22 | 22 | import java.nio.charset.Charset;
|
23 | 23 |
|
24 |
| -import com.fasterxml.jackson.annotation.JsonView; |
25 |
| -import com.fasterxml.jackson.dataformat.xml.XmlMapper; |
26 |
| -import static org.hamcrest.CoreMatchers.*; |
27 |
| -import static org.junit.Assert.*; |
28 |
| -import static org.junit.Assert.assertEquals; |
29 | 24 | import org.junit.Test;
|
30 | 25 |
|
31 | 26 | import org.springframework.http.HttpOutputMessage;
|
32 | 27 | import org.springframework.http.MediaType;
|
33 | 28 | import org.springframework.http.MockHttpInputMessage;
|
34 | 29 | import org.springframework.http.MockHttpOutputMessage;
|
35 |
| -import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter; |
36 | 30 | import org.springframework.http.converter.HttpMessageNotReadableException;
|
| 31 | +import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter; |
37 | 32 | import org.springframework.http.converter.json.MappingJacksonValue;
|
38 | 33 |
|
| 34 | +import com.fasterxml.jackson.annotation.JsonView; |
| 35 | +import com.fasterxml.jackson.dataformat.xml.XmlMapper; |
| 36 | + |
| 37 | +import static org.hamcrest.CoreMatchers.*; |
| 38 | +import static org.junit.Assert.*; |
| 39 | + |
39 | 40 | /**
|
40 | 41 | * Jackson 2.x XML converter tests.
|
41 | 42 | *
|
@@ -211,6 +212,7 @@ public void setArray(String[] array) {
|
211 | 212 | private interface MyJacksonView1 {};
|
212 | 213 | private interface MyJacksonView2 {};
|
213 | 214 |
|
| 215 | + @SuppressWarnings("unused") |
214 | 216 | private static class JacksonViewBean {
|
215 | 217 |
|
216 | 218 | @JsonView(MyJacksonView1.class)
|
@@ -246,8 +248,8 @@ public void setWithoutView(String withoutView) {
|
246 | 248 | }
|
247 | 249 | }
|
248 | 250 |
|
| 251 | + @SuppressWarnings("serial") |
249 | 252 | private static class MyXmlMapper extends XmlMapper {
|
250 |
| - |
251 | 253 | }
|
252 | 254 |
|
253 | 255 | }
|
0 commit comments