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



##########
File path: 
dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/utils/EnterpriseWeChatUtils.java
##########
@@ -99,9 +99,7 @@ public static String getToken() throws IOException {
                 response.close();
             }
 
-            Map<String, Object> map = JSON.parseObject(resp,
-                    new TypeToken<Map<String, Object>>() {
-                    }.getType());
+            Map<String, Object> map = JSONUtils.parseObject(resp, Map.class);

Review comment:
       parseObject is hard to understand ,suggest add parseMap method ,refer to 
the following code 
   `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