Files
openide/java/java-impl/resources/inspectionDescriptions/LambdaParameterHidingMemberVariable.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

22 lines
667 B
HTML

<html>
<body>
Reports lambda parameters named identically to a field of a surrounding class.
As a result of such naming, you may accidentally use the lambda parameter when using the identically named field is intended.
<p>A quick-fix is suggested to rename the lambda parameter.</p>
<p><b>Example:</b></p>
<pre><code>
public class MyClass {
public Object foo;
void sort(List&lt;Integer&gt; list) {
list.sort((foo, bar) -> foo - bar);
}
}
</code></pre>
<!-- tooltip end -->
<p>
Use the option to choose whether to ignore fields that are not visible from the lambda expression.
For example, private fields of a superclass.
<p>
</body>
</html>