forked from phoedos/pmd
Merge branch 'pr-406'
This commit is contained in:
@ -14,6 +14,11 @@ public class ASTLambdaExpression extends AbstractJavaAccessNode {
|
||||
public ASTLambdaExpression(JavaParser p, int id) {
|
||||
super(p, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFindBoundary() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Accept the visitor. **/
|
||||
public Object jjtAccept(JavaParserVisitor visitor, Object data) {
|
||||
|
@ -105,6 +105,23 @@ public class Foo {
|
||||
</test-code>
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
method in lambda expression is ok
|
||||
]]></description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
public class Foo {
|
||||
public Foo(String s) {
|
||||
addActionListener(() -> bar());
|
||||
addActionListener(() -> { bar(); });
|
||||
addActionListener((a) -> { bar(); });
|
||||
addActionListener(this::bar);
|
||||
}
|
||||
public void bar() {}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
bug report 975407
|
||||
]]></description>
|
||||
<expected-problems>0</expected-problems>
|
||||
|
@ -17,7 +17,12 @@ This is a minor release.
|
||||
|
||||
### Fixed Issues
|
||||
|
||||
* java-design
|
||||
* [#397](https://github.com/pmd/pmd/issues/397): \[java] ConstructorCallsOverridableMethodRule: false positive for method called from lambda expression
|
||||
|
||||
### API Changes
|
||||
|
||||
### External Contributions
|
||||
|
||||
* [#406](https://github.com/pmd/pmd/pull/406): \[java] False positive with lambda in java-design/ConstructorCallsOverridableMethod
|
||||
|
||||
|
Reference in New Issue
Block a user