Class SubTypeValidator
- java.lang.Object
-
- com.fasterxml.jackson.databind.jsontype.impl.SubTypeValidator
-
public class SubTypeValidator extends java.lang.Object
Helper class used to encapsulate rules that determine subtypes that are invalid to use, even with default typing, mostly due to security concerns. Used byBeanDeserializerFactory
- Since:
- 2.8.11
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<java.lang.String>
_cfgIllegalClassNames
Set of class names of types that are never to be deserialized.protected static java.util.Set<java.lang.String>
DEFAULT_NO_DESER_CLASS_NAMES
Set of well-known "nasty classes", deserialization of which is considered dangerous and should (and is) prevented by default.protected static java.lang.String
PREFIX_C3P0
protected static java.lang.String
PREFIX_SPRING
-
Constructor Summary
Constructors Modifier Constructor Description protected
SubTypeValidator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SubTypeValidator
instance()
void
validateSubType(DeserializationContext ctxt, JavaType type, BeanDescription beanDesc)
-
-
-
Field Detail
-
PREFIX_SPRING
protected static final java.lang.String PREFIX_SPRING
- See Also:
- Constant Field Values
-
PREFIX_C3P0
protected static final java.lang.String PREFIX_C3P0
- See Also:
- Constant Field Values
-
DEFAULT_NO_DESER_CLASS_NAMES
protected static final java.util.Set<java.lang.String> DEFAULT_NO_DESER_CLASS_NAMES
Set of well-known "nasty classes", deserialization of which is considered dangerous and should (and is) prevented by default.
-
_cfgIllegalClassNames
protected java.util.Set<java.lang.String> _cfgIllegalClassNames
Set of class names of types that are never to be deserialized.
-
-
Method Detail
-
instance
public static SubTypeValidator instance()
-
validateSubType
public void validateSubType(DeserializationContext ctxt, JavaType type, BeanDescription beanDesc) throws JsonMappingException
- Throws:
JsonMappingException
-
-