This is not a false-positive per se, but rather a too strict rule.
The rule S1123 checks whether a method annotated with
@Deprecated has a Javadoc tag
@deprecated and vice versa. This is pretty useful because with only the annotation one would not know what the intended replacement for the method or class is.
With SonarJava 4.11 a change was made to the requiring one of the annotation attributes
since or 'forRemoval` to be set when using Java >= 9.
This has one of the following implications:
- Existing code targeting Java >= 9 with methods/classes annotated/tagged as deprecated and conforming to the rule (with SonarJava < 4.11) is suddenly non-conformant after updating the rule
- Existing code targeting Java < 9 with methods/classes annotated/tagged as deprecated and conforming to the rule (with SonarJava >= 4.11) is suddenly non-conformant after targeting Java >= 9
This causes new issues and possibly more work. In my opinion, checking the annotation attributes should have been optional. Thus I kindly ask to either make the attribute check optional or to split this new feature into a separate rule.