You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Martin Tzvetanov Grigorov (Jira)" <ji...@apache.org> on 2024/02/21 09:19:00 UTC
[jira] [Resolved] (AVRO-3938) Schema.Parser.validate should not be null
[ https://issues.apache.org/jira/browse/AVRO-3938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Tzvetanov Grigorov resolved AVRO-3938.
---------------------------------------------
Fix Version/s: 1.12.0
Assignee: Martin Tzvetanov Grigorov
Resolution: Fixed
> Schema.Parser.validate should not be null
> -----------------------------------------
>
> Key: AVRO-3938
> URL: https://issues.apache.org/jira/browse/AVRO-3938
> Project: Apache Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.11.3
> Reporter: Heewon Lee
> Assignee: Martin Tzvetanov Grigorov
> Priority: Trivial
> Labels: pull-request-available
> Fix For: 1.12.0
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> The class `org.apache.avro.Schema.Parser` has a private final property `validate`. This implies that should `null` be passed to the constructor, it is destined to throw an NPE at a later, arbitrary time when `validate` will be used.
> Thus, I propose a simple one-line guard against `null` here for a fail-fast error, which would allow for a much easier debugging.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)