@Nullable/@NotNull with IntelliJ IDEA, Maven & JSR 305

Thomas picture Thomas · Dec 17, 2010 · Viewed 7.9k times · Source

I really like the code inspection functionalities which are now able with either JSR 305 or Jetbrains' proprietary annotations for IntelliJ. Unfortunately both implementations (JSR 305 and Jetbrains') do not mix well:

  • IntelliJ obviously only understands its own proprietary set of annotations and integrates them quite well.
  • Using Findbugs in my Maven Build, it only supports JSR-305 annotations.

The only possible workaround might be to go for JSR-305 and use the Findbugs plugin in IntelliJ. Has anybody a better idea? (please don't say change your IDE ;) ).

Thanks Thomas

Answer

Wim Deblauwe picture Wim Deblauwe · May 19, 2011