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



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/DataSourceService.java
##########
@@ -315,9 +313,9 @@ private void handlePasswd(List<DataSource> dataSourceList) {
         for (DataSource dataSource : dataSourceList) {
 
             String connectionParams  = dataSource.getConnectionParams();
-            JSONObject  object = JSON.parseObject(connectionParams);
+            ObjectNode  object = JSONUtils.parseObject(connectionParams);
             object.put(Constants.PASSWORD, Constants.XXXXXX);
-            dataSource.setConnectionParams(JSONUtils.toJson(object));
+            dataSource.setConnectionParams(JSONUtils.toJsonString(object));

Review comment:
       paramObject is ObjectNode ,why not use toString directly ?




----------------------------------------------------------------
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