martin-g commented on a change in pull request #1301:
URL: https://github.com/apache/avro/pull/1301#discussion_r702650851
##########
File path: lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java
##########
@@ -892,6 +902,9 @@ public int resolveUnion(Schema union, Object datum) {
protected String getSchemaName(Object datum) {
if (datum == null || datum == JsonProperties.NULL_VALUE)
return Type.NULL.getName();
+ String primativeType = PRIMATIVE_DATUM_TYPES.get(datum.getClass());
+ if (primativeType != null)
+ return primativeType;
Review comment:
In addition, `PRIMATIVE_DATUM_TYPES` handles primitives' wrapper
classes, like `Integer.class`. Does it need to handle `Integer.TYPE` too ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]