1- package com .fasterxml .jackson .databind .deser ;
1+ package com .fasterxml .jackson .databind .jsontype . deftyping ;
22
33import com .fasterxml .jackson .annotation .JsonTypeInfo ;
44import com .fasterxml .jackson .databind .BaseMapTest ;
1313import java .util .Collection ;
1414import java .util .List ;
1515
16- // Tests for [databind#pending ] causing a NPE when setting a DefaultTypeResolverBuilder
16+ // Tests for [databind#3505 ] causing a NPE when setting a DefaultTypeResolverBuilder
1717// and registering subtypes through ObjectMapper (no annotations)
18- public class TestDeserializerFactoryWithDefaultTypeResolverBuilder extends BaseMapTest {
19-
20- private interface Parent {
18+ public class DefaultTypeResolver3505Test
19+ extends BaseMapTest
20+ {
21+ interface Parent {
2122 class ChildOne implements Parent {
2223 public String one ;
2324 }
@@ -30,8 +31,10 @@ class ChildTwo implements Parent {
3031 // This class is technically not needed for the test to fail without the fix
3132 // (AsDeductionTypeDeserializer will crash in #buildFingerprints), but was
3233 // added to have more assertions on the subtypes values
33- private static final class AssertingTypeResolverBuilder extends ObjectMapper .DefaultTypeResolverBuilder {
34-
34+ @ SuppressWarnings ("serial" )
35+ static final class AssertingTypeResolverBuilder
36+ extends ObjectMapper .DefaultTypeResolverBuilder
37+ {
3538 public AssertingTypeResolverBuilder () {
3639 super (ObjectMapper .DefaultTyping .NON_CONCRETE_AND_ARRAYS ,
3740 BasicPolymorphicTypeValidator .builder ().allowIfSubType (Parent .class ).build ());
0 commit comments