[
https://issues.apache.org/jira/browse/AVRO-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18095540#comment-18095540
]
ASF subversion and git services commented on AVRO-4242:
-------------------------------------------------------
Commit bb72c294b1c9a6290b6b190edef75fb51340bc2e in avro's branch
refs/heads/main from Ismaël Mejía
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=bb72c294b1 ]
AVRO-4242: [Java] Fix NPE in DataFileStream and DataFileReader when schema
metadata is missing
Malformed Avro container files without the 'avro.schema' metadata entry
caused a NullPointerException in both DataFileStream and DataFileReader12
when the null value was passed directly to Schema.Parser.parse(). Replace
inline parsing with null-safe helper methods that throw a descriptive
IOException instead.
> Malformed Avro container without schema metadata should fail graciously
> -----------------------------------------------------------------------
>
> Key: AVRO-4242
> URL: https://issues.apache.org/jira/browse/AVRO-4242
> Project: Apache Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.11.5, 1.12.1
> Reporter: Ismaël Mejía
> Assignee: Ismaël Mejía
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> An avro container header without the schema metadata produces a
> NullPointerException,
> we can handle this more graciously throwing an IOException in such case.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)