@@ -327,6 +327,36 @@ public void testUnusedLocalVarEnum() throws Exception {
327327 expected );
328328 }
329329
330+ @ Test
331+ public void testUnusedLocalVarLambdas () throws Exception {
332+ final String [] expected = {
333+ "14:9: " + getCheckMessage (MSG_UNUSED_LOCAL_VARIABLE , "hoo" ),
334+ "20:17: " + getCheckMessage (MSG_UNUSED_LOCAL_VARIABLE , "j" ),
335+ "31:9: " + getCheckMessage (MSG_UNUSED_LOCAL_VARIABLE , "hoo2" ),
336+ "32:9: " + getCheckMessage (MSG_UNUSED_LOCAL_VARIABLE , "hoo3" ),
337+ "33:15: " + getCheckMessage (MSG_UNUSED_LOCAL_VARIABLE , "myComponent" ),
338+ "34:19: " + getCheckMessage (MSG_UNUSED_LOCAL_VARIABLE , "myComponent3" ),
339+ "40:25: " + getCheckMessage (MSG_UNUSED_LOCAL_VARIABLE , "j" ),
340+ "52:21: " + getCheckMessage (MSG_UNUSED_LOCAL_VARIABLE , "j" ),
341+ "65:17: " + getCheckMessage (MSG_UNUSED_LOCAL_VARIABLE , "ja" ),
342+ "73:9: " + getCheckMessage (MSG_UNUSED_LOCAL_VARIABLE , "k" ),
343+ };
344+ verifyWithInlineConfigParser (
345+ getPath ("InputUnusedLocalVariableLambdaExpression.java" ),
346+ expected );
347+ }
348+
349+ @ Test
350+ public void testUnusedLocalVariableLocalClasses () throws Exception {
351+ final String [] expected = {
352+ "14:9: " + getCheckMessage (MSG_UNUSED_LOCAL_VARIABLE , "a" ),
353+ "15:9: " + getCheckMessage (MSG_UNUSED_LOCAL_VARIABLE , "ab" ),
354+ };
355+ verifyWithInlineConfigParser (
356+ getPath ("InputUnusedLocalVariableLocalClasses.java" ),
357+ expected );
358+ }
359+
330360 @ Test
331361 public void testUnusedLocalVarRecords () throws Exception {
332362 final String [] expected = {
0 commit comments