[java:S1123] False-positive when additional JavaDoc present

Hi,

the Rule S1123 produces a false positive if prior to a Javadoc comment describing the deprecation is another Javadoc comment.

For example:

/**
 * copyright notice
 */

/**
 * @deprecated this class is deprecated for testing purposes
 */
@Deprecated(since = "1.0")
public class DeprecatedClass {
             ^^^^^^^^^^^^^^^
             Add the missing @deprecated Javadoc tag
}

Apparently, only the commentary in the first Javadoc is examined and the second Javadoc is ignored.

  • SonarQube version: 8.9 LTS
  • SonarLint version: 5.9.0

Oliver

1 Like

Hello @oliver

Thanks for reporting this false positive, ticket created: SONARJAVA-3905.

Best,
Quentin

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.