biya-bi commented on PR #696:
URL: https://github.com/apache/commons-lang/pull/696#issuecomment-1846291671

   The question is what output are we expecting from the method?
   `Arrays.stream(enumClass.getEnumConstants()).filter(predicate);` will return 
a stream. We don't want to give more work to the caller of the 
getEnumByPredicate method.
   If we want the returned value to be a list, we need to append 
`.collect(Collectors.toList())`.
   If we want the returned value to be a single value, we need to pick the 
first element from the filter's result, in one way or the other.


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to