Skip to content

Commit afb0049

Browse files
committed
Update to use JsonTypeInfo.As.NOTHING
1 parent aa09d02 commit afb0049

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/tools/jackson/databind/jsontype/impl/NoOpTypeDeserializer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ public TypeDeserializer forProperty(BeanProperty prop) {
4848

4949
@Override
5050
public JsonTypeInfo.As getTypeInclusion() {
51-
// No proper value but need to return something
52-
return JsonTypeInfo.As.EXISTING_PROPERTY;
51+
return JsonTypeInfo.As.NOTHING;
5352
}
5453

5554
@Override

src/main/java/tools/jackson/databind/jsontype/impl/NoOpTypeSerializer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ public TypeSerializer forProperty(SerializationContext ctxt, BeanProperty prop)
3838

3939
@Override
4040
public JsonTypeInfo.As getTypeInclusion() {
41-
// No proper one to use but must return something:
42-
return JsonTypeInfo.As.EXISTING_PROPERTY;
41+
return JsonTypeInfo.As.NOTHING;
4342
}
4443

4544
@Override
@@ -49,6 +48,8 @@ public String getPropertyName() {
4948

5049
@Override
5150
public TypeIdResolver getTypeIdResolver() {
51+
// 07-Dec-2025, tatu: [databind#1654] Important! Indicates
52+
// that no actual Type Id handled.
5253
return null;
5354
}
5455

0 commit comments

Comments
 (0)