Add test case for #1316

This commit is contained in:
Juan Martín Sotuyo Dodero
2024-03-18 00:11:14 -03:00
parent c084e54c58
commit 37d352b3c1

View File

@@ -1098,6 +1098,31 @@ public final class ObjectID {
public static final int TEAK_TREE_40758 = 40758;
}
*/
]]></code>
</test-code>
<test-code>
<description>#1316 FP for local method shadowing static import</description>
<expected-problems>0</expected-problems>
<code><![CDATA[
import static java.lang.Thread.setUncaughtExceptionHandler;
public class Foo {
static {
setUncaughtExceptionHandler(null); // using static import, ok
}
public interface ExceptionHandler {
void setUncaughtExceptionHandler(Object o);
}
private final ExceptionHandler noopHandler = new ExceptionHandler() {
@Override
public void setUncaughtExceptionHandler(Object o) {
Thread.setUncaughtExceptionHandler(null); // need to fully qualify, should be ok
}
};
}
]]></code>
</test-code>
</test-data>