Add test case for #1316
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user