Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Implemented
-
Trunk
-
None
-
None
Description
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:
.forEach(componentDir -> retrieveComponentConfig(componentDir));
To make the code clearer, you can turn that lambda expression into a method reference:
.forEach(ComponentContainer::retrieveComponentConfig);