From 2fdb7e2cbd685b5fbfd64345abd784ce25285700 Mon Sep 17 00:00:00 2001 From: Robert Stupp Date: Mon, 1 Aug 2022 11:07:43 +0200 Subject: [PATCH] Error out on unnecessary lambda (#4835) --- codestyle/errorprone-rules.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codestyle/errorprone-rules.properties b/codestyle/errorprone-rules.properties index 763eaece3f7..e81bb02c368 100644 --- a/codestyle/errorprone-rules.properties +++ b/codestyle/errorprone-rules.properties @@ -1161,7 +1161,7 @@ URLEqualsHashCode=ERROR #UnnecessaryAssignment=WARN # Fields annotated with @Inject/@Mock should not be manually assigned to, as they should be initialized by a framework. Remove the assignment if a framework is being used, or the annotation if one isn't. -#UnnecessaryLambda=WARN +UnnecessaryLambda=ERROR # Returning a lambda from a helper method or saving it in a constant is unnecessary; prefer to implement the functional interface method directly and use a method reference instead. #UnnecessaryLongToIntConversion=WARN