Improved: Use method references instead of lambda inside variables (OFBIZ-10817) Lambda expressions are not meant to be stored inside variables. In most cases it is better to define a static method and use a method reference instead. Static methods have the benefits of having a more explicit signature and some javadoc attached to them.