You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/11/15 12:03:19 UTC

[GitHub] [incubator-dolphinscheduler] CalvinKirs commented on a change in pull request #3481: [Improvement-3471][common] JSONUtils.toMap It is not necessary to check whether the JSON method is empty again. #3471

CalvinKirs commented on a change in pull request #3481:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3481#discussion_r523749165



##########
File path: dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/utils/EnterpriseWeChatUtils.java
##########
@@ -101,11 +101,10 @@ public static String getToken() throws IOException {
             }
 
             Map<String, String> map = JSONUtils.toMap(resp);
-            if (map != null) {
-                return map.get("access_token");
-            } else {
+            if (map == null) {
                 return null;
             }
+            return map.get("access_token");

Review comment:
       please review.thx




----------------------------------------------------------------
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:
users@infra.apache.org