Unable to add @deprecated javadoc tag for deprecated record variable

Please provide

  • Operating system: Debian 12
  • SonarLint plugin version: 10.9.0.79423
  • IntelliJ version:IntelliJ IDEA 2024.2.1 Ultimate Edition
  • Programming language you’re coding in: Java
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version):

And a thorough description of the problem / question:

If I deprecate a specific variable in a record, there doesn’t seem to be a way to add a javadoc with a deprecated tag for that variable without adding a dangling javadoc

as you can see from the first screenshot where I am hovering over var2, it has the issue java:s1133.

As you can see from the second screenshot, I can get rid of that issue by adding the javadoc specific to var, but that results in a dangling javadoc

Hi @modernNeo , thanks for this report, and welcome to the community!

You’re right, the rule should make an exception in that case, because what the message says just cannot be fulfilled.

I created a ticket to track on that issue here.

Best,
Marco