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

Jarek Jarcec Cecho updated SQOOP-1786:
--------------------------------------
    Attachment: SQOOP-1786.patch

I'm still having troubles with submitting patches to review board, so I'm 
attaching the patch only here.

> 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
>
>         Attachments: SQOOP-1786.patch
>
>
> 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)

Reply via email to