@@ -97,16 +97,8 @@ public boolean isAnnotationBundle(Annotation ann) {
97
97
@ Override
98
98
public PropertyName findRootName (AnnotatedClass ac )
99
99
{
100
- PropertyName name1 = _primary .findRootName (ac );
101
- if (name1 == null ) {
102
- return _secondary .findRootName (ac );
103
- }
104
- if (name1 .hasSimpleName ()) {
105
- return name1 ;
106
- }
107
- // name1 is empty; how about secondary?
108
- PropertyName name2 = _secondary .findRootName (ac );
109
- return (name2 == null ) ? name1 : name2 ;
100
+ return PropertyName .merge (_primary .findRootName (ac ),
101
+ _secondary .findRootName (ac ));
110
102
}
111
103
112
104
// since 2.12
@@ -177,27 +169,6 @@ public String findClassDescription(AnnotatedClass ac) {
177
169
return str ;
178
170
}
179
171
180
- @ Override
181
- @ Deprecated // since 2.8
182
- public String [] findPropertiesToIgnore (Annotated ac , boolean forSerialization ) {
183
- String [] result = _primary .findPropertiesToIgnore (ac , forSerialization );
184
- if (result == null ) {
185
- result = _secondary .findPropertiesToIgnore (ac , forSerialization );
186
- }
187
- return result ;
188
- }
189
-
190
- @ Override
191
- @ Deprecated // since 2.8
192
- public Boolean findIgnoreUnknownProperties (AnnotatedClass ac )
193
- {
194
- Boolean result = _primary .findIgnoreUnknownProperties (ac );
195
- if (result == null ) {
196
- result = _secondary .findIgnoreUnknownProperties (ac );
197
- }
198
- return result ;
199
- }
200
-
201
172
@ Override
202
173
@ Deprecated // since 2.12
203
174
public JsonIgnoreProperties .Value findPropertyIgnorals (Annotated a )
@@ -464,17 +435,8 @@ public JsonFormat.Value findFormat(Annotated ann) {
464
435
465
436
@ Override
466
437
public PropertyName findWrapperName (Annotated ann ) {
467
- PropertyName name = _primary .findWrapperName (ann );
468
- if (name == null ) {
469
- name = _secondary .findWrapperName (ann );
470
- } else if (name == PropertyName .USE_DEFAULT ) {
471
- // does the other introspector have a better idea?
472
- PropertyName name2 = _secondary .findWrapperName (ann );
473
- if (name2 != null ) {
474
- name = name2 ;
475
- }
476
- }
477
- return name ;
438
+ return PropertyName .merge (_primary .findWrapperName (ann ),
439
+ _secondary .findWrapperName (ann ));
478
440
}
479
441
480
442
@ Override
@@ -534,11 +496,8 @@ public AnnotatedMethod resolveSetterConflict(MapperConfig<?> config,
534
496
@ Override // since 2.11
535
497
public PropertyName findRenameByField (MapperConfig <?> config ,
536
498
AnnotatedField f , PropertyName implName ) {
537
- PropertyName n = _secondary .findRenameByField (config , f , implName );
538
- if (n == null ) {
539
- n = _primary .findRenameByField (config , f , implName );
540
- }
541
- return n ;
499
+ return PropertyName .merge (_secondary .findRenameByField (config , f , implName ),
500
+ _primary .findRenameByField (config , f , implName ));
542
501
}
543
502
544
503
// // // Serialization: type refinements
@@ -577,17 +536,8 @@ public void findAndAddVirtualProperties(MapperConfig<?> config, AnnotatedClass a
577
536
578
537
@ Override
579
538
public PropertyName findNameForSerialization (Annotated a ) {
580
- PropertyName n = _primary .findNameForSerialization (a );
581
- // note: "use default" should not block explicit answer, so:
582
- if (n == null ) {
583
- n = _secondary .findNameForSerialization (a );
584
- } else if (n == PropertyName .USE_DEFAULT ) {
585
- PropertyName n2 = _secondary .findNameForSerialization (a );
586
- if (n2 != null ) {
587
- n = n2 ;
588
- }
589
- }
590
- return n ;
539
+ return PropertyName .merge (_primary .findNameForSerialization (a ),
540
+ _secondary .findNameForSerialization (a ));
591
541
}
592
542
593
543
@ Override
@@ -764,17 +714,9 @@ public JsonPOJOBuilder.Value findPOJOBuilderConfig(AnnotatedClass ac) {
764
714
@ Override
765
715
public PropertyName findNameForDeserialization (Annotated a )
766
716
{
767
- // note: "use default" should not block explicit answer, so:
768
- PropertyName n = _primary .findNameForDeserialization (a );
769
- if (n == null ) {
770
- n = _secondary .findNameForDeserialization (a );
771
- } else if (n == PropertyName .USE_DEFAULT ) {
772
- PropertyName n2 = _secondary .findNameForDeserialization (a );
773
- if (n2 != null ) {
774
- n = n2 ;
775
- }
776
- }
777
- return n ;
717
+ return PropertyName .merge (
718
+ _primary .findNameForDeserialization (a ),
719
+ _secondary .findNameForDeserialization (a ));
778
720
}
779
721
780
722
@ Override
0 commit comments