File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -405,4 +405,30 @@ public class A {
405405 Parser a12;
406406 }
407407}
408+ ```
409+
410+ ### ` removeUnusedLambdaParameters `
411+
412+ Rename unused lambda parameters, or unused pattern variables to ` _ ` .
413+
414+ For example:
415+
416+ ``` java
417+ J j = (a, b) - > System . out. println(a);
418+
419+ switch (r) {
420+ case R(_, long l) - > {}
421+ case R r2 - > {}
422+ }
423+ ```
424+
425+ becomes:
426+
427+ ``` java
428+ J j = (a, _) - > System . out. println(a);
429+
430+ switch (r) {
431+ case R(_, _) - > {}
432+ case R _ - > {}
433+ }
408434```
Original file line number Diff line number Diff line change 13131313 " switchExpression" ,
13141314 " tryWithResource" ,
13151315 " renameFileToType" ,
1316- " organizeImports"
1316+ " organizeImports" ,
1317+ " removeUnusedLambdaParameters"
13171318 ]
13181319 },
13191320 "default" : [
You can’t perform that action at this time.
0 commit comments