0

IntelliJ is adding @Nonnull annotations on code generated via the implement methods feature. How to prevent IntelliJ from annotating signatures with that annotation?

IntelliJ 2019.1

Thanks

beluchin
  • 12,047
  • 4
  • 24
  • 35
  • 1
    Do you have the interface signature annotated with `@NotNull`? Why do you want the implementation to omit the annotation? – CrazyCoder Sep 13 '19 at 19:25
  • @CrazyCoder - you are right! the method signatures on the interface are annotated with `@Nonnull`. I did not notice that before. – beluchin Sep 13 '19 at 19:30

1 Answers1

2

IntelliJ IDEA copies the annotations from the interface declaration, there is no way to disable this behavior.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904