Skip to content

Commit 31ac1b7

Browse files
committed
Minor tweaking to reduce diff, use Jackson's RuntimeException
1 parent 41d3060 commit 31ac1b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

avro/src/main/java/com/fasterxml/jackson/dataformat/avro/schema/RecordVisitor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public RecordVisitor(SerializerProvider p, JavaType type, VisitorFormatWrapperIm
8282
_typeSchema = null;
8383
} else {
8484
// If Avro schema for this _type results in UNION I want to know Avro type where to assign fields
85-
_typeSchema = AvroSchemaHelper.initializeRecordSchema(bean);
86-
_avroSchema = _typeSchema;
85+
_avroSchema = AvroSchemaHelper.initializeRecordSchema(bean);
86+
_typeSchema = _avroSchema;
8787
_overridden = false;
8888
AvroMeta meta = bean.getClassInfo().getAnnotation(AvroMeta.class);
8989
if (meta != null) {
@@ -128,7 +128,7 @@ public RecordVisitor(SerializerProvider p, JavaType type, VisitorFormatWrapperIm
128128
}
129129
_avroSchema = Schema.createUnion(new ArrayList<>(unionSchemas));
130130
} catch (JsonMappingException jme) {
131-
throw new RuntimeException("Failed to build schema", jme);
131+
throw new RuntimeJsonMappingException("Failed to build schema", jme);
132132
}
133133
}
134134
}

0 commit comments

Comments
 (0)