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/06/13 12:40:11 UTC

[GitHub] [incubator-dolphinscheduler] gabrywu commented on a change in pull request #2920: Simplify some methods for easy understanding

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



##########
File path: dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/CollectionUtils.java
##########
@@ -98,8 +98,8 @@ public static boolean isEmpty(Collection coll) {
         }
         String[] strings = str.split(separator);
         Map<String, String> map = new HashMap<>(strings.length);
-        for (int i = 0; i < strings.length; i++) {
-            String[] strArray = strings[i].split("=");
+        for (String string : strings) {

Review comment:
       I do not think foreach is better than fori ,especial for [] 




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