diff --git a/pmd-java/src/test/java/net/sourceforge/pmd/typeresolution/testdata/LocalGenericClass.java b/pmd-java/src/test/java/net/sourceforge/pmd/typeresolution/testdata/LocalGenericClass.java index 636e4b1404..35cf462ad7 100644 --- a/pmd-java/src/test/java/net/sourceforge/pmd/typeresolution/testdata/LocalGenericClass.java +++ b/pmd-java/src/test/java/net/sourceforge/pmd/typeresolution/testdata/LocalGenericClass.java @@ -12,15 +12,18 @@ public class LocalGenericClass { @Override public void accept(T t) { } + @Override public Optional get() { return Optional.empty(); } + @Override public void combine(MyLocalClass other) { accept(other.state); } } + new MyLocalClass(); } @@ -28,12 +31,14 @@ public class LocalGenericClass { void combine(T t); } - private static interface MyConsumer { + private interface MyConsumer { void accept(R r); } - private static interface MySupplier { + + private interface MySupplier { S get(); } + private static class Optional { public static Optional empty() { return new Optional();