[
https://issues.apache.org/jira/browse/PIG-3302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13655830#comment-13655830
]
Prashant Kommireddi commented on PIG-3302:
------------------------------------------
Looks good to me, TestJsonLoaderStorage and ant test-commit all pass.
+1
> 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