From b6f45ed6187bebdefc4a51f058d6655d5cfdffc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 15 Nov 2024 17:54:35 -0300 Subject: [PATCH] Ensure types don't match --- .../lang/java/rule/bestpractices/xml/UnusedPrivateMethod.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedPrivateMethod.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedPrivateMethod.xml index 12b92436d9..329eaaf54b 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedPrivateMethod.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedPrivateMethod.xml @@ -2306,7 +2306,7 @@ import java.util.Set; public class Foo { private void foo(AnotherUnresolvedType baz) {} private void foo(UnresolvedType baz) {} - public void bar(Set s) { + public void bar(Set s) { s.forEach(this::foo); // Not being able to resolve UnresolvedType and AnotherUnresolvedType means we can't tell which foo is being used hereā€¦ } }