@@ -959,13 +959,13 @@ protected ValueSerializer<Object> _createAndCacheUntypedSerializer(Class<?> rawT
959
959
JavaType fullType )
960
960
{
961
961
// Important: must introspect all annotations, not just class
962
- BeanDescription beanDesc = introspectBeanDescription (fullType );
962
+ BeanDescription . Supplier beanDescRef = lazyIntrospectBeanDescription (fullType );
963
963
ValueSerializer <Object > ser ;
964
964
try {
965
- ser = _serializerFactory .createSerializer (this , fullType , beanDesc , null );
965
+ ser = _serializerFactory .createSerializer (this , fullType , beanDescRef , null );
966
966
} catch (IllegalArgumentException iae ) {
967
967
// We better only expose checked exceptions, since those are what caller is expected to handle
968
- reportBadTypeDefinition (beanDesc , ClassUtil .exceptionMessage (iae ));
968
+ reportBadTypeDefinition (beanDescRef , ClassUtil .exceptionMessage (iae ));
969
969
ser = null ; // never gets here
970
970
}
971
971
// Always cache -- and in this case both for raw and full type
@@ -976,10 +976,10 @@ protected ValueSerializer<Object> _createAndCacheUntypedSerializer(Class<?> rawT
976
976
protected ValueSerializer <Object > _createAndCacheUntypedSerializer (JavaType type )
977
977
{
978
978
// Important: must introspect all annotations, not just class
979
- BeanDescription beanDesc = introspectBeanDescription (type );
979
+ BeanDescription . Supplier beanDescRef = lazyIntrospectBeanDescription (type );
980
980
ValueSerializer <Object > ser ;
981
981
try {
982
- ser = _serializerFactory .createSerializer (this , type , beanDesc , null );
982
+ ser = _serializerFactory .createSerializer (this , type , beanDescRef , null );
983
983
} catch (IllegalArgumentException iae ) {
984
984
// We better only expose checked exceptions, since those are what caller is expected to handle
985
985
throw _mappingProblem (iae , ClassUtil .exceptionMessage (iae ));
@@ -996,10 +996,10 @@ protected ValueSerializer<Object> _createAndCacheUntypedSerializer(JavaType type
996
996
protected ValueSerializer <Object > _createAndCachePropertySerializer (Class <?> rawType ,
997
997
JavaType fullType , BeanProperty prop )
998
998
{
999
- BeanDescription beanDesc = introspectBeanDescription (fullType );
999
+ BeanDescription . Supplier beanDescRef = lazyIntrospectBeanDescription (fullType );
1000
1000
ValueSerializer <Object > ser ;
1001
1001
try {
1002
- ser = _serializerFactory .createSerializer (this , fullType , beanDesc , null );
1002
+ ser = _serializerFactory .createSerializer (this , fullType , beanDescRef , null );
1003
1003
} catch (IllegalArgumentException iae ) {
1004
1004
throw _mappingProblem (iae , ClassUtil .exceptionMessage (iae ));
1005
1005
}
@@ -1008,7 +1008,7 @@ protected ValueSerializer<Object> _createAndCachePropertySerializer(Class<?> raw
1008
1008
if (prop == null ) {
1009
1009
return ser ;
1010
1010
}
1011
- return _checkShapeShifting (fullType , beanDesc , prop , ser );
1011
+ return _checkShapeShifting (fullType , beanDescRef , prop , ser );
1012
1012
}
1013
1013
1014
1014
/**
@@ -1018,10 +1018,10 @@ protected ValueSerializer<Object> _createAndCachePropertySerializer(Class<?> raw
1018
1018
protected ValueSerializer <Object > _createAndCachePropertySerializer (JavaType type ,
1019
1019
BeanProperty prop )
1020
1020
{
1021
- BeanDescription beanDesc = introspectBeanDescription (type );
1021
+ BeanDescription . Supplier beanDescRef = lazyIntrospectBeanDescription (type );
1022
1022
ValueSerializer <Object > ser ;
1023
1023
try {
1024
- ser = _serializerFactory .createSerializer (this , type , beanDesc , null );
1024
+ ser = _serializerFactory .createSerializer (this , type , beanDescRef , null );
1025
1025
} catch (IllegalArgumentException iae ) {
1026
1026
throw _mappingProblem (iae , ClassUtil .exceptionMessage (iae ));
1027
1027
}
@@ -1030,12 +1030,12 @@ protected ValueSerializer<Object> _createAndCachePropertySerializer(JavaType typ
1030
1030
if (prop == null ) {
1031
1031
return ser ;
1032
1032
}
1033
- return _checkShapeShifting (type , beanDesc , prop , ser );
1033
+ return _checkShapeShifting (type , beanDescRef , prop , ser );
1034
1034
}
1035
1035
1036
1036
@ SuppressWarnings ("unchecked" )
1037
- private ValueSerializer <Object > _checkShapeShifting (JavaType type , BeanDescription beanDesc ,
1038
- BeanProperty prop , ValueSerializer <?> ser )
1037
+ private ValueSerializer <Object > _checkShapeShifting (JavaType type ,
1038
+ BeanDescription . Supplier beanDescRef , BeanProperty prop , ValueSerializer <?> ser )
1039
1039
{
1040
1040
JsonFormat .Value overrides = prop .findFormatOverrides (_config );
1041
1041
if (overrides != null ) {
@@ -1045,7 +1045,7 @@ private ValueSerializer<Object> _checkShapeShifting(JavaType type, BeanDescripti
1045
1045
ser = ser2 ;
1046
1046
} else {
1047
1047
// But if not, we need to re-create it via factory
1048
- ser = _serializerFactory .createSerializer (this , type , beanDesc , overrides );
1048
+ ser = _serializerFactory .createSerializer (this , type , beanDescRef , overrides );
1049
1049
}
1050
1050
}
1051
1051
return (ValueSerializer <Object >) ser ;
0 commit comments