szvasas commented on a change in pull request #77: SQOOP-3435 Avoid NullPointerException due to different JSONObject library in classpath URL: https://github.com/apache/sqoop/pull/77#discussion_r271218043
########## File path: src/java/org/apache/sqoop/util/SqoopJsonUtil.java ########## @@ -40,6 +40,9 @@ private SqoopJsonUtil() { } public static String getJsonStringforMap(Map<String, String> map) { + if (map == null) { Review comment: Nit: it is a good practice not to reassign the input parameters so I would change this to something like the following: `Map<String, String> mapToUse = (map == null) ? emptyMap() : map; JSONObject pathPartMap = new JSONObject(mapToUse);` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services