You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2009/11/11 22:22:39 UTC

[jira] Created: (AVRO-192) schema parser needs better error handling for arrays and maps

schema parser needs better error handling for arrays and maps
-------------------------------------------------------------

                 Key: AVRO-192
                 URL: https://issues.apache.org/jira/browse/AVRO-192
             Project: Avro
          Issue Type: Improvement
          Components: java
            Reporter: Doug Cutting
            Priority: Minor


Java's schema parser fails with a NullPointerException if an array schema lacks an "items" type specification or a map schema lacks a "values" type specification.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-192) schema parser needs better error handling for arrays and maps

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-192:
------------------------------

    Fix Version/s: 1.3.0
           Status: Patch Available  (was: Open)

> schema parser needs better error handling for arrays and maps
> -------------------------------------------------------------
>
>                 Key: AVRO-192
>                 URL: https://issues.apache.org/jira/browse/AVRO-192
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Doug Cutting
>            Assignee: Doug Cutting
>            Priority: Minor
>             Fix For: 1.3.0
>
>         Attachments: AVRO-192.patch, AVRO-192.patch
>
>
> Java's schema parser fails with a NullPointerException if an array schema lacks an "items" type specification or a map schema lacks a "values" type specification.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-192) schema parser needs better error handling for arrays and maps

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-192:
------------------------------

    Attachment: AVRO-192.patch

Updated patch with unit tests.

> schema parser needs better error handling for arrays and maps
> -------------------------------------------------------------
>
>                 Key: AVRO-192
>                 URL: https://issues.apache.org/jira/browse/AVRO-192
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Doug Cutting
>            Assignee: Doug Cutting
>            Priority: Minor
>         Attachments: AVRO-192.patch, AVRO-192.patch
>
>
> Java's schema parser fails with a NullPointerException if an array schema lacks an "items" type specification or a map schema lacks a "values" type specification.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-192) schema parser needs better error handling for arrays and maps

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-192:
------------------------------

    Attachment: AVRO-192.patch

Here's a patch that fixes this.

> schema parser needs better error handling for arrays and maps
> -------------------------------------------------------------
>
>                 Key: AVRO-192
>                 URL: https://issues.apache.org/jira/browse/AVRO-192
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Doug Cutting
>            Priority: Minor
>         Attachments: AVRO-192.patch
>
>
> Java's schema parser fails with a NullPointerException if an array schema lacks an "items" type specification or a map schema lacks a "values" type specification.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AVRO-192) schema parser needs better error handling for arrays and maps

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting reassigned AVRO-192:
---------------------------------

    Assignee: Doug Cutting

> schema parser needs better error handling for arrays and maps
> -------------------------------------------------------------
>
>                 Key: AVRO-192
>                 URL: https://issues.apache.org/jira/browse/AVRO-192
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Doug Cutting
>            Assignee: Doug Cutting
>            Priority: Minor
>         Attachments: AVRO-192.patch
>
>
> Java's schema parser fails with a NullPointerException if an array schema lacks an "items" type specification or a map schema lacks a "values" type specification.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-192) schema parser needs better error handling for arrays and maps

Posted by "Philip Zeyliger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776682#action_12776682 ] 

Philip Zeyliger commented on AVRO-192:
--------------------------------------

Took a look at the patch.  +1.

It'd be nice if the tests asserted that a certain string was in the error message, but I don't insist.  That's just gravy.

bq. throw new RuntimeException("Should not have parsed: "+json);

I think you could just do fail("Should have not parsed:" + json), which causes junit to record this as an assertion failure instead of an exception, though I've never much bothered with caring which way tests failed.

> schema parser needs better error handling for arrays and maps
> -------------------------------------------------------------
>
>                 Key: AVRO-192
>                 URL: https://issues.apache.org/jira/browse/AVRO-192
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Doug Cutting
>            Assignee: Doug Cutting
>            Priority: Minor
>             Fix For: 1.3.0
>
>         Attachments: AVRO-192.patch, AVRO-192.patch
>
>
> Java's schema parser fails with a NullPointerException if an array schema lacks an "items" type specification or a map schema lacks a "values" type specification.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-192) schema parser needs better error handling for arrays and maps

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-192:
------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

I just committed this, replacing the exception with a call to fail().

> schema parser needs better error handling for arrays and maps
> -------------------------------------------------------------
>
>                 Key: AVRO-192
>                 URL: https://issues.apache.org/jira/browse/AVRO-192
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Doug Cutting
>            Assignee: Doug Cutting
>            Priority: Minor
>             Fix For: 1.3.0
>
>         Attachments: AVRO-192.patch, AVRO-192.patch
>
>
> Java's schema parser fails with a NullPointerException if an array schema lacks an "items" type specification or a map schema lacks a "values" type specification.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.