Skip to content

Commit 7f116b5

Browse files
committed
Apply review
1 parent 1966d6c commit 7f116b5

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/main/java/com/fasterxml/jackson/databind/introspect/JacksonAnnotationIntrospector.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,8 +1510,7 @@ protected TypeResolverBuilder<?> _findTypeResolver(MapperConfig<?> config,
15101510
Annotated ann, JavaType baseType)
15111511
{
15121512
// since 2.16 : backporting {@link JsonTypeInfo.Value} from 3.0
1513-
final AnnotationIntrospector ai = config.getAnnotationIntrospector();
1514-
JsonTypeInfo.Value typeInfo = ai.findPolymorphicTypeInfo(config, ann);
1513+
JsonTypeInfo.Value typeInfo = findPolymorphicTypeInfo(config, ann);
15151514

15161515
// First: maybe we have explicit type resolver?
15171516
TypeResolverBuilder<?> b;

src/main/java/com/fasterxml/jackson/databind/jsontype/TypeResolverBuilder.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,19 @@ public TypeDeserializer buildTypeDeserializer(DeserializationConfig config,
103103
* Initialization method that is called right after constructing
104104
* the builder instance, in cases where information could not be
105105
* passed directly (for example when instantiated for an annotation)
106+
* <p>
107+
* NOTE: This method will be abstract in Jackson 3.0.
106108
*
107109
* @param settings Configuration settings to apply.
108110
*
109111
* @return Resulting builder instance (usually this builder,
110112
* but not necessarily)
111-
*
112-
* @since 2.16
113+
*
114+
* @since 2.16 (backported from Jackson 3.0)
113115
*/
114-
public T init(JsonTypeInfo.Value settings, TypeIdResolver res);
115-
116+
default T init(JsonTypeInfo.Value settings, TypeIdResolver res) {
117+
return init(settings.getIdType(), res);
118+
}
116119

117120
/*
118121
/**********************************************************

src/test/java/com/fasterxml/jackson/databind/ser/jdk/MapKeySerializationTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ public void testUnWrappedMapWithDefaultType() throws Exception{
256256
assertEquals("{\"@type\":\"HashMap\",\"xxxB\":\"bar\"}", json);
257257
}
258258

259-
// [databind#838]
260259
public void testUnWrappedMapWithDefaultTypeWithValue() throws Exception {
261260
final ObjectMapper mapper = new ObjectMapper();
262261
SimpleModule mod = new SimpleModule("test");

0 commit comments

Comments
 (0)