Avro
  1. Avro
  2. AVRO-166

Minor refactoring of Schema.java to better error reporting on bad schemas.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0
    • Component/s: java
    • Labels:
      None

      Description

      Originally part of AVRO-152, this introduces getStringOptional and getStringRequired helper methods, to facilitate throwing meaningful exceptions when something's wrong with a schema.

      There aren't tests that bad schemas fail the validation in the expected ways, but this did trigger a test which had a fixed field of size 0, which makes no sense; that has been fixed.

      Where it was immediately adjacent, I've fixed brace-less if's according to the style guide (http://java.sun.com/docs/codeconv/html/CodeConventions.doc6.html#449).

      1. AVRO-166.patch.txt
        5 kB
        Philip Zeyliger

        Activity

        Doug Cutting made changes -
        Component/s java [ 12312780 ]
        Doug Cutting made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Doug Cutting made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 1.3.0 [ 12314318 ]
        Resolution Fixed [ 1 ]
        Philip Zeyliger made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Assignee Philip Zeyliger [ philip ]
        Philip Zeyliger made changes -
        Field Original Value New Value
        Attachment AVRO-166.patch.txt [ 12422772 ]
        Philip Zeyliger created issue -

          People

          • Assignee:
            Philip Zeyliger
            Reporter:
            Philip Zeyliger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development