@@ -29,13 +29,6 @@ public abstract class ConcreteBeanPropertyBase
29
29
*/
30
30
protected final PropertyMetadata _metadata ;
31
31
32
- /**
33
- * Lazily accessed value for per-property format override definition.
34
- *
35
- * @since 2.8
36
- */
37
- protected transient JsonFormat .Value _propertyFormat ;
38
-
39
32
/**
40
33
* @since 2.9
41
34
*/
@@ -47,7 +40,6 @@ protected ConcreteBeanPropertyBase(PropertyMetadata md) {
47
40
48
41
protected ConcreteBeanPropertyBase (ConcreteBeanPropertyBase src ) {
49
42
_metadata = src ._metadata ;
50
- _propertyFormat = src ._propertyFormat ;
51
43
}
52
44
53
45
@ Override
@@ -78,27 +70,19 @@ public final JsonFormat.Value findFormatOverrides(AnnotationIntrospector intr) {
78
70
@ Override
79
71
public JsonFormat .Value findPropertyFormat (MapperConfig <?> config , Class <?> baseType )
80
72
{
81
- // 15-Apr-2016, tatu: Let's calculate lazily, retain; assumption being however that
82
- // baseType is always the same
83
- JsonFormat .Value v = _propertyFormat ;
84
- if (v == null ) {
85
- JsonFormat .Value v1 = config .getDefaultPropertyFormat (baseType );
86
- JsonFormat .Value v2 = null ;
87
- AnnotationIntrospector intr = config .getAnnotationIntrospector ();
88
- if (intr != null ) {
89
- AnnotatedMember member = getMember ();
90
- if (member != null ) {
91
- v2 = intr .findFormat (member );
92
- }
93
- }
94
- if (v1 == null ) {
95
- v = (v2 == null ) ? EMPTY_FORMAT : v2 ;
96
- } else {
97
- v = (v2 == null ) ? v1 : v1 .withOverrides (v2 );
73
+ JsonFormat .Value v1 = config .getDefaultPropertyFormat (baseType );
74
+ JsonFormat .Value v2 = null ;
75
+ AnnotationIntrospector intr = config .getAnnotationIntrospector ();
76
+ if (intr != null ) {
77
+ AnnotatedMember member = getMember ();
78
+ if (member != null ) {
79
+ v2 = intr .findFormat (member );
98
80
}
99
- _propertyFormat = v ;
100
81
}
101
- return v ;
82
+ if (v1 == null ) {
83
+ return (v2 == null ) ? EMPTY_FORMAT : v2 ;
84
+ }
85
+ return (v2 == null ) ? v1 : v1 .withOverrides (v2 );
102
86
}
103
87
104
88
@ Override
0 commit comments