mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
[java-inspections] ReflectionForUnavailableAnnotation: fix NullPointerException
GitOrigin-RevId: 203ff77a14096913a4b9c8b07ee4eea9ea658cf6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
25b1f21fb7
commit
06369b2c81
@@ -0,0 +1,10 @@
|
||||
// "Annotate annotation 'NotNull' as @Retention" "false"
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
class Foo {
|
||||
boolean bar(Method method) {
|
||||
return method.getAnnotation(NotNull.class<caret>) != null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Annotate annotation 'Subst' as @Retention" "false"
|
||||
import org.intellij.lang.annotations.Subst;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
class Foo {
|
||||
boolean bar(Method method) {
|
||||
return method.getAnnotation(Subst.class<caret>) != null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user