mirror of
https://github.com/apache/sqoop.git
synced 2025-05-02 17:40:39 +08:00
SQOOP-3435: Avoid NullPointerException due to different JSONObject library in classpath
This commit is contained in:
parent
0216f7fbb7
commit
e90e244396
@ -40,7 +40,8 @@ private SqoopJsonUtil() {
|
||||
}
|
||||
|
||||
public static String getJsonStringforMap(Map<String, String> map) {
|
||||
JSONObject pathPartMap = new JSONObject(map);
|
||||
Map<String, String> mapToUse = (map == null) ? Collections.emptyMap() : map;
|
||||
JSONObject pathPartMap = new JSONObject(mapToUse);
|
||||
return pathPartMap.toString();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user