Search for contract violation warnings (e.g. @NotNull or or @Nullable)

Hi All,

What's the best way (if one exists) to search  for all potential violations of a (for instance) @NotNull annotation on a specific field or method?

1 comment
Comment actions Permalink

There's no way to achieve exactly this task. But there's a way to do something very close. Namely, perform Find Usages on the field or the method. Then, without closing the view with the results, run Analyze | Run Inspection by Name... | Constant Conditions & Exceptions and in the Scope combo choose "Files in Previous Search Results". That should be relatively fast and give you all the results that you want (plus some others).

0

Please sign in to leave a comment.