File tree 2 files changed +13
-1
lines changed
main/java/com/fasterxml/jackson/dataformat/avro
test/java/com/fasterxml/jackson/dataformat/avro/interop
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 6
6
import com .fasterxml .jackson .databind .introspect .Annotated ;
7
7
import com .fasterxml .jackson .databind .introspect .AnnotatedMember ;
8
8
9
+ import java .util .Collections ;
10
+ import java .util .List ;
11
+
12
+ import org .apache .avro .reflect .AvroAlias ;
9
13
import org .apache .avro .reflect .AvroDefault ;
10
14
import org .apache .avro .reflect .AvroIgnore ;
11
15
import org .apache .avro .reflect .AvroName ;
@@ -52,6 +56,15 @@ public String findPropertyDefaultValue(Annotated m) {
52
56
return (ann == null ) ? null : ann .value ();
53
57
}
54
58
59
+ @ Override
60
+ public List <PropertyName > findPropertyAliases (Annotated m ) {
61
+ AvroAlias ann = _findAnnotation (m , AvroAlias .class );
62
+ if (ann == null ) {
63
+ return null ;
64
+ }
65
+ return Collections .singletonList (PropertyName .construct (ann .alias ()));
66
+ }
67
+
55
68
protected PropertyName _findName (Annotated a )
56
69
{
57
70
AvroName ann = _findAnnotation (a , AvroName .class );
Original file line number Diff line number Diff line change 15
15
import org .apache .avro .io .EncoderFactory ;
16
16
import org .apache .avro .reflect .ReflectData ;
17
17
18
- import com .fasterxml .jackson .core .JsonProcessingException ;
19
18
import com .fasterxml .jackson .databind .JavaType ;
20
19
import com .fasterxml .jackson .databind .JsonMappingException ;
21
20
import com .fasterxml .jackson .dataformat .avro .AvroMapper ;
You can’t perform that action at this time.
0 commit comments