Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3938

Schema.Parser.validate should not be null

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.11.3
    • 1.12.0
    • java

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              pingpingy Heewon Lee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h