Pawan Verma created OFBIZ-11835:
-----------------------------------
Summary: 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
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)