[ 
https://issues.apache.org/jira/browse/SQOOP-1786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14226038#comment-14226038
 ] 

ASF subversion and git services commented on SQOOP-1786:
--------------------------------------------------------

Commit 39e99cc5f049aca32dbc9ce25f28b85500b843f1 in sqoop's branch 
refs/heads/sqoop2 from [~abec]
[ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=39e99cc ]

SQOOP-1786: Sqoop2: Stop using JSONValue.parse method call

(Jarek Jarcec Cecho via Abraham Elmahrek)


> 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