[ 
https://issues.apache.org/jira/browse/AVRO-2337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17744624#comment-17744624
 ] 

Christophe Le Saec commented on AVRO-2337:
------------------------------------------

Resolved with [AVRO-2512|https://issues.apache.org/jira/browse/AVRO-2512].
I suggest to mark this JIRA as resolved ? ([~belugabehr])

> Possibility of NPE in SchemaCompatibility
> -----------------------------------------
>
>                 Key: AVRO-2337
>                 URL: https://issues.apache.org/jira/browse/AVRO-2337
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.9.0, 1.8.2
>            Reporter: David Mollitor
>            Priority: Minor
>
> {code:java}
> final Field writerField = lookupWriterField(writer, readerField);
> // ---- following block is only entered if writerField is 'null'
> if (writerField == null) {
>   if (readerField.defaultValue() == null) {
>     if (readerField.schema().getType() == Type.ENUM && 
> readerField.schema().getEnumDefault() != null) {
>        // ---- writerField is accessed
>       result = result.mergedWith(getCompatibility("type", 
> readerField.schema(),
>         writerField.schema(), location));
>     } else {
> ...
> {code}
> [https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/SchemaCompatibility.java#L417]
>   
>  
> [https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/SchemaCompatibility.java#L424]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to