Uh oh!
There was an error while loading. Please reload this page.
TAJO-2058: foreach loop can be collapsed with stream api - #944
TAJO-2058: foreach loop can be collapsed with stream api#944dkhwangbo wants to merge 17 commits into
Conversation
There was a problem hiding this comment.
Actually in a case like this, I think it's sufficient and more clear.
hash.specifiers.addAll(specifiers);or more simply,
hash.specifiers = newArrayList<>(specifiers);Anyway, I think stream doesn't matter.
Because it is simple shallow copy, there are many ways.
There was a problem hiding this comment.
@eminency Thanks for your comment. I agree with your opinion.
I'll rewrite it overall correlated with a simple shallow copy.
eminency
commented
Mar 9, 2016
Time to merge. |
dkhwangbo
commented
Mar 10, 2016
@eminency Thanks for your comment. Unfortunately, I face with some unsuspected error while travis test. I'm in investigation about it's cause. |
| for (PartitionSpecifier specifier : specifiers) { | ||
| hash.specifiers.add(specifier); | ||
| } | ||
| hash.specifiers = specifiers.stream().collect(Collectors.toList()); |
There was a problem hiding this comment.
It is sufficient with:
hash.specifiers = newArrayList<>(specifiers);eminency
commented
Mar 17, 2016
Even though they may not exact, I left some comments. |
dkhwangbo
commented
Mar 22, 2016
@eminency Hi! Thanks for your comment. I apply your comment. |
I replace many foreach loop with stream api.