In my java project, I have a java bean which have the @NotNull annotation. But actually we don’t use validator to check the bean input. So the field is possible null. And then in some place we check the field != null then sonar submit a bug
Change this condition so that it does not always evaluate to "true".
I think sonar should not restrict based on mutable facts, e.g. annotation which may be implemented or not implemented, or result may be different. At least should not submit a major bug.