Skip to content

Commit e330141

Browse files
committed
Merge branch '2.x' into 3.x
2 parents d1a7575 + 6ab3060 commit e330141

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

avro/src/main/java/tools/jackson/dataformat/avro/schema/RecordVisitor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ public RecordVisitor(SerializationContext p, JavaType type, VisitorFormatWrapper
6666
} else if (subTypes != null && !subTypes.isEmpty()) {
6767
List<Schema> unionSchemas = new ArrayList<>();
6868
for (NamedType subType : subTypes) {
69-
ValueSerializer<?> ser = getContext().findValueSerializer(subType.getType());
69+
final JavaType subTypeType = getContext().getTypeFactory().constructType(subType.getType());
70+
ValueSerializer<?> ser = getContext().findValueSerializer(subTypeType);
7071
VisitorFormatWrapperImpl visitor = _visitorWrapper.createChildWrapper();
71-
ser.acceptJsonFormatVisitor(visitor, getContext().getTypeFactory().constructType(subType.getType()));
72+
ser.acceptJsonFormatVisitor(visitor, subTypeType);
7273
unionSchemas.add(visitor.getAvroSchema());
7374
}
7475
_avroSchema = Schema.createUnion(unionSchemas);

0 commit comments

Comments
 (0)