[ 
https://issues.apache.org/jira/browse/PIG-3302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rohini Palaniswamy updated PIG-3302:
------------------------------------

    Status: Patch Available  (was: Open)
    
> JSONStorage throws NPE if map has null values
> ---------------------------------------------
>
>                 Key: PIG-3302
>                 URL: https://issues.apache.org/jira/browse/PIG-3302
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.11.1
>            Reporter: Rohini Palaniswamy
>            Assignee: Rohini Palaniswamy
>             Fix For: 0.12
>
>         Attachments: PIG-3302-1.patch
>
>
> JsonStorage.java:
> case DataType.MAP:
>             json.writeFieldName(field.getName());
>             json.writeStartObject();
>             for (Map.Entry<String, Object> e : ((Map<String,
> Object>)d).entrySet()) {
>                 json.writeStringField(e.getKey(), e.getValue().toString());
>             }
>             json.writeEndObject();
>             return;
> If e.getValue() is null, e.getValue().toString() will throw NPE. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to