JavadocTypeCheck incorrectly matches record component @param tags using prefix instead of exact match (original) (raw)

I noticed that the Javadoc check does not correctly validate @param tags for record components.

Currently, it treats a tag as valid if it shares a prefix with the component name, instead of requiring an exact match. This leads to inconsistent validation results.


Steps to reproduce

  1. Create a file with the following content:

/**

  1. Use the following Checkstyle configuration:
  1. Run Checkstyle:

checkstyle -c checkstyle.xml Sample.java


Expected behavior


Actual behavior


Why this is a problem

This creates inconsistent behavior:

This makes the validation confusing and unreliable.