forked from phoedos/pmd
Add test case ensuring we don't incur in FNs
This commit is contained in:
parent
b264fa14e1
commit
aad8e93a2f
@ -2297,4 +2297,20 @@ public class ObtainViaTest {
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>UnusedPrivateMethod #5083 - method reference without target type (3)</description>
|
||||
<expected-problems>2</expected-problems>
|
||||
<code><![CDATA[
|
||||
import java.util.Set;
|
||||
|
||||
public class Foo {
|
||||
private void foo(AnotherUnresolvedType baz) {}
|
||||
private void foo(UnresolvedType baz) {}
|
||||
public void bar(Set<UnresolvedType> s) {
|
||||
s.forEach(this::foo); // Not being able to resolve UnresolvedType and AnotherUnresolvedType means we can't tell which foo is being used here…
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
</test-data>
|
||||
|
Loading…
x
Reference in New Issue
Block a user