[
https://issues.apache.org/jira/browse/OFBIZ-11835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17139358#comment-17139358 ]
Pawan Verma commented on OFBIZ-11835:
-------------------------------------
Attached patch for this improvement.
> Replace single method call lambda with method reference
> -------------------------------------------------------
>
> Key: OFBIZ-11835
> URL:
https://issues.apache.org/jira/browse/OFBIZ-11835> Project: OFBiz
> Issue Type: Improvement
> Components: ALL COMPONENTS
> Affects Versions: Trunk
> Reporter: Pawan Verma
> Assignee: Pawan Verma
> Priority: Minor
> Attachments: OFBIZ-11835.patch
>
>
> We know that we can use lambda expressions instead of using an anonymous class. But sometimes, the lambda expression is really just a call to some method, for example:
> {code:java}
> .forEach(componentDir -> retrieveComponentConfig(componentDir));{code}
> To make the code clearer, you can turn that lambda expression into a method reference:
> {code:java}
> .forEach(ComponentContainer::retrieveComponentConfig);{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)