I was setuping my project when saw this on @NotNull annotation in my DTOs
Not 'javax.validation.constraints.NotNull' but 'org.jetbrains.annotations.NotNull' would be used for code generation
I have import javax.validation.constraints.NotNull;
But still see this warning.
Why IDEA dont want to use javax NotNull and what should I do to force it?
When you compile your project, the IDE adds assertions to all methods and parameters annotated with the @NotNull annotation. The assertions will fail if null is passed in code where @NotNull is expected. You can disable this option and configure the list of annotations in the Settings/Preferences dialog Ctrl+Alt+S. Go to Build, Execution, Deployment | Compiler.
https://www.jetbrains.com/help/idea/nullable-and-notnull-annotations.html
Maybe this would to the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With