MappingJackson2MessageConverter delegates default encoding to Jackson
Closes gh-22444
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2019 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.
|
||||
@@ -56,7 +56,7 @@ public class MappingJackson2MessageConverterTests {
|
||||
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
public void setup() {
|
||||
sessionMock = mock(Session.class);
|
||||
converter = new MappingJackson2MessageConverter();
|
||||
converter.setEncodingPropertyName("__encoding__");
|
||||
@@ -263,8 +263,11 @@ public class MappingJackson2MessageConverterTests {
|
||||
return new MyAnotherBean();
|
||||
}
|
||||
|
||||
|
||||
public static class MyBean {
|
||||
|
||||
private String foo;
|
||||
|
||||
public MyBean() {
|
||||
}
|
||||
|
||||
@@ -272,8 +275,6 @@ public class MappingJackson2MessageConverterTests {
|
||||
this.foo = foo;
|
||||
}
|
||||
|
||||
private String foo;
|
||||
|
||||
public String getFoo() {
|
||||
return foo;
|
||||
}
|
||||
@@ -290,13 +291,10 @@ public class MappingJackson2MessageConverterTests {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MyBean bean = (MyBean) o;
|
||||
|
||||
if (foo != null ? !foo.equals(bean.foo) : bean.foo != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -306,9 +304,12 @@ public class MappingJackson2MessageConverterTests {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private interface Summary {};
|
||||
|
||||
private interface Full extends Summary {};
|
||||
|
||||
|
||||
private static class MyAnotherBean {
|
||||
|
||||
@JsonView(Summary.class)
|
||||
|
||||
Reference in New Issue
Block a user