Rohini Palaniswamy created PIG-3302:
---------------------------------------
Summary: 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
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