mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-27 15:13:13 +07:00
Fixes IDEA-323362 IntelliJ gives "Not annotated method overrides method annotated with @Nonnull" despite @NonNullApi GitOrigin-RevId: 1b4298ffc3a1fc9ce4f4e5b9412e3af5a3b116d9
27 lines
561 B
Java
27 lines
561 B
Java
import javax.annotation.Nonnull;
|
|
import java.lang.annotation.ElementType;
|
|
import java.lang.annotation.Target;
|
|
|
|
class Test {
|
|
static class Super {
|
|
@Nonnull
|
|
public String foo(@Nonnull String foo) {
|
|
return "";
|
|
}
|
|
}
|
|
|
|
@NonNullApi
|
|
static class FooSub extends Super {
|
|
|
|
@Override
|
|
public String foo(String foo) {
|
|
return super.foo(foo);
|
|
}
|
|
}
|
|
|
|
@Target(ElementType.TYPE)
|
|
@javax.annotation.Nonnull
|
|
@javax.annotation.meta.TypeQualifierDefault({ElementType.METHOD, ElementType.PARAMETER})
|
|
public @interface NonNullApi {
|
|
}
|
|
} |