gabrywu commented on a change in pull request #2872:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/2872#discussion_r435924490



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/DataSourceService.java
##########
@@ -526,8 +524,7 @@ public String buildParameter(String name, String desc, 
DbType type, String host,
             parameterMap.put(Constants.PRINCIPAL,principal);
         }
         if (other != null && !"".equals(other)) {
-            LinkedHashMap<String, String> map = JSON.parseObject(other, new 
TypeReference<LinkedHashMap<String, String>>() {
-            });
+            LinkedHashMap<String, String> map = JSONUtils.parseObject(other, 
LinkedHashMap.class);

Review comment:
       suggest use TypeReference to parse 'other' variable
   `TypeReference<HashMap<String, String>> typeRef 
     = new TypeReference<HashMap<String, String>>() {};
   Map<String, String> map = mapper.readValue(jsonInput, typeRef);`




----------------------------------------------------------------
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:
[email protected]


Reply via email to