Simplify some methods for easy understanding#2920
Simplify some methods for easy understanding#2920gabry-lab merged 21 commits intoapache:devfrom CalvinKirs:messy
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #2920 +/- ##
============================================
- Coverage 39.31% 39.11% -0.21%
+ Complexity 2700 2688 -12
============================================
Files 435 435
Lines 20123 20114 -9
Branches 2453 2452 -1
============================================
- Hits 7912 7868 -44
- Misses 11458 11494 +36
+ Partials 753 752 -1 Continue to review full report at Codecov.
|
|
@CalvinKirs can you resolve the failed checks |
Interestingly, commons-beanutils actually detects LICENSE failure |
| 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) { |
There was a problem hiding this comment.
I do not think foreach is better than fori ,especial for []
There was a problem hiding this comment.
I do not think foreach is better than fori ,especial for []
When he doesn’t use the index, it’s not so elegant to use this form, what do you think?
There was a problem hiding this comment.
I don't think so .Using index to traverse array [] is a standard way ,right ? Why is it not elegant?
foreach is better than fori when traversing List, Set, Array ,etc.
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/IpUtils.java
Show resolved
Hide resolved
gabry-lab
left a comment
There was a problem hiding this comment.
Please give more details about the reason changing the code ?
I have added instructions, please look again, tks |
|
Kudos, SonarCloud Quality Gate passed!
|
|
@gabrywu Thank you very much for your suggestion, I have completed the change, please review it, tks |
Tips
What is the purpose of the pull request
1:Deprecated method replace
2:Simplify some methods for easy understanding
Brief change log
Small changes
Verify this pull request
(Please pick either of the following options)
This pull request is already covered by existing tests, such as (please describe tests).