Skip to content

Commit 62a7d09

Browse files
authored
Fix #5960: deprecate SubTypeValidator (#5961)
1 parent c28903c commit 62a7d09

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎release-notes/VERSION‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ Versions: 3.x (for earlier see VERSION-2.x)
212212
(fix by @cowtowncoder, w/ Claude code)
213213
#5958: `@JsonView` ignored with `@JsonTypeInfo(include = As.EXTERNAL_PROPERTY)`
214214
(fixed by Omkhar A)
215+
#5960: Deprecate un-maintained `tools.jackson.databind.jsontype.impl.SubTypeValidator`
215216
- Remove project-specific Android SDK compatibility level, use shared;
216217
no change level itself (stillAndroid SDK 34)
217218

‎src/main/java/tools/jackson/databind/deser/BeanDeserializerFactory.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,7 @@ protected boolean isIgnorableType(DeserializationContext ctxt, BeanPropertyDefin
11081108
return status.booleanValue();
11091109
}
11101110

1111+
@SuppressWarnings("deprecation")
11111112
protected void _validateSubType(DeserializationContext ctxt, JavaType type,
11121113
BeanDescription.Supplier beanDescRef)
11131114
{

‎src/main/java/tools/jackson/databind/jsontype/impl/SubTypeValidator.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@
1212
* Helper class used to encapsulate rules that determine subtypes that
1313
* are invalid to use, even with default typing, mostly due to security
1414
* concerns.
15-
* Used by <code>BeanDeserializerFactory</code>
15+
* Used by {@code BeanDeserializerFactory}.
16+
*<p>
17+
* HAS NOT BEEN UPDATED OR MAINTAINED SINCE JACKSON 2.10.
1618
*
1719
* @since 2.8.11
20+
* @deprecated Since 3.2 (un-maintained since 2.10)
1821
*/
22+
@Deprecated
1923
public class SubTypeValidator
2024
{
2125
protected final static String PREFIX_SPRING = "org.springframework.";

‎src/main/java/tools/jackson/databind/ser/VirtualBeanPropertyWriter.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected VirtualBeanPropertyWriter(BeanPropertyDefinition propDef,
5151
super(propDef, propDef.getPrimaryMember(), contextAnnotations, declaredType,
5252
ser, typeSer, serType,
5353
_suppressNulls(inclusion), _suppressableValue(inclusion),
54-
includeInViews, inclusion);
54+
includeInViews, inclusion, null);
5555
}
5656

5757
protected VirtualBeanPropertyWriter(VirtualBeanPropertyWriter base) {

0 commit comments

Comments
 (0)