Jarek Jarcec Cecho created SQOOP-1786:
-----------------------------------------
Summary: Sqoop2: Stop using JSONValue.parse method call
Key: SQOOP-1786
URL: https://issues.apache.org/jira/browse/SQOOP-1786
Project: Sqoop
Issue Type: Bug
Affects Versions: 1.99.4
Reporter: Jarek Jarcec Cecho
Assignee: Jarek Jarcec Cecho
Fix For: 1.99.5
While investigating SQOOP-1784, I've noticed that {{JSONValue.parse()}} method
that we're using everywhere in the code base is [swallowing
exceptions|http://json-simple.googlecode.com/svn/trunk/src/main/java/org/json/simple/JSONValue.java]
and returning {{null}} on all failure scenarios.
As this is causing a random {{NullPointerException}} being thrown elsewhere
without proper information what went wrong, I would like to migrate to method
{{JSONValue.parseWithException()}} instead. Given how much we're parsing JSONs
inside Sqoop 2, I would also recommend to create a small Util class that will
handle error cases and coverts the {{ParserException}} to {{SqoopException}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)