[
https://issues.apache.org/jira/browse/AVRO-1589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143966#comment-14143966
]
Hudson commented on AVRO-1589:
------------------------------
FAILURE: Integrated in AvroJava #481 (See
[https://builds.apache.org/job/AvroJava/481/])
AVRO-1589. Java: Fix ReflectData.AllowNulls to not create unions for primitive
types. Contributed by Ryan Blue. (cutting: rev 1626913)
* /avro/trunk/CHANGES.txt
*
/avro/trunk/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectData.java
*
/avro/trunk/lang/java/avro/src/test/java/org/apache/avro/reflect/TestReflectAllowNulls.java
> [Java] ReflectData.AllowNulls will create incompatible Schemas for primitive
> types
> ----------------------------------------------------------------------------------
>
> Key: AVRO-1589
> URL: https://issues.apache.org/jira/browse/AVRO-1589
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.7.7
> Reporter: Ryan Blue
> Assignee: Ryan Blue
> Fix For: 1.8.0
>
> Attachments: AVRO-1589-1.patch, AVRO-1589-2.patch
>
>
> {{ReflectData.AllowNulls}} will always create nullable types, even if the
> reflected object has primitive fields. When assigning a null to a primitive
> field, Java always throws a {{NullPointerException}}. I think the right thing
> to do is to allow nulls for any {{Object}} and return required schemas for
> primitive types.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)