error-prone icon indicating copy to clipboard operation
error-prone copied to clipboard

InvalidParam warning on Javadoc for Java record components

Open DenWav opened this issue 3 years ago • 6 comments

Description of the problem / feature request:

Javadoc on Java record components are @param tags on the record itself. It's also possible to override the accessor methods, but that shouldn't be necessary. error-prone produces an InvalidParam warning here though, as it doesn't seem to understand the Java record syntax.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

/**
 * Example record.
 * @param name Name of the example record.
 */
public record ExampleRecord(String name) {
}

What version of Error Prone are you using?

2.6.0

DenWav avatar May 06 '21 22:05 DenWav

Ran into this in 2.10.0 as well.

dododge avatar Nov 24 '21 14:11 dododge

I can confirm that this is still an issue today, on 2.11.0.

grongor avatar Mar 15 '22 09:03 grongor

@rickie I see you made a PR to fix this, but it’s against your fork. Do you plan to merge it into the main repo?

bkrieger avatar Sep 06 '22 13:09 bkrieger

We have a process where we first review and verify the code in our own fork. Once we are satisfied with the quality we open a PR upstream.

In other words, yes, we plan to open a PR for this in the main repository.

rickie avatar Sep 06 '22 13:09 rickie

Thanks! Do you have an estimated timeline (trying to decide how much time we should spend on a workaround on our side)?

bkrieger avatar Sep 06 '22 15:09 bkrieger

@bkrieger Opened https://github.com/google/error-prone/pull/3437 which contains a fix 😄.

rickie avatar Sep 08 '22 11:09 rickie