Annotate method paramaters in LocalInspectionTool as @NotNull?

E.g. in

public ProblemDescriptor[] checkMethod(PsiMethod method, InspectionManager manager, boolean isOnTheFly)

In my own inspection subclass I can rely on method and manager arguments to be not null, can I?
If so, shouldn't the parameters be annotated as such?
Otherwise my inspection gets warnings if I pass the received arguments on to other methods annotated as NotNull.

2 comments

FWIW, I've never seen those arguments passed as null, and InspectionGadgets would be throwing errors all over the place if they could. The methods should be annotated, but that sort of thing is easy to overlook. If only there were a tool which could automatically introduce annotations on such methods...

--Dave Griffith

0

Hello Stephen,

SF> public ProblemDescriptor[] checkMethod(PsiMethod method,
SF> InspectionManager manager, boolean isOnTheFly)
SF>
SF> In my own inspection subclass I can rely on method and manager
SF> arguments to be not null, can I?
SF>
SF> If so, shouldn't the parameters be annotated as such?

Could you please file a JIRA request for this issue?

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.