java.lang.NullPointerException is thrown using a method-reference but not a lambda expression
This behaviour relies on a subtle difference between the evaluation process of method-references and lambda expressions. From the JLS Run-Time Evaluation of Method References: First, if the method reference expression begins with an ExpressionName or a Primary, this subexpression is evaluated. If the subexpression evaluates to null, a NullPointerException is raised, and the method reference …