JAVA-6303: corrected formatting
This commit is contained in:
parent
0595a35062
commit
8542ba368a
|
@ -34,9 +34,9 @@ public class SubTypeHandlingUnitTest {
|
||||||
public void givenSubType_whenNotUsingNoArgsConstructors_thenSucceed() throws IOException {
|
public void givenSubType_whenNotUsingNoArgsConstructors_thenSucceed() throws IOException {
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
PolymorphicTypeValidator ptv = BasicPolymorphicTypeValidator.builder()
|
PolymorphicTypeValidator ptv = BasicPolymorphicTypeValidator.builder()
|
||||||
.allowIfSubType("com.baeldung.jackson.inheritance")
|
.allowIfSubType("com.baeldung.jackson.inheritance")
|
||||||
.allowIfSubType("java.util.ArrayList")
|
.allowIfSubType("java.util.ArrayList")
|
||||||
.build();
|
.build();
|
||||||
mapper.activateDefaultTyping(ptv, ObjectMapper.DefaultTyping.NON_FINAL);
|
mapper.activateDefaultTyping(ptv, ObjectMapper.DefaultTyping.NON_FINAL);
|
||||||
|
|
||||||
Car car = new Car("Mercedes-Benz", "S500", 5, 250.0);
|
Car car = new Car("Mercedes-Benz", "S500", 5, 250.0);
|
||||||
|
|
Loading…
Reference in New Issue