error-prone
error-prone copied to clipboard
InvalidParam warning on Javadoc for Java record components
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
Ran into this in 2.10.0 as well.
I can confirm that this is still an issue today, on 2.11.0.
@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?
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.
Thanks! Do you have an estimated timeline (trying to decide how much time we should spend on a workaround on our side)?
@bkrieger Opened https://github.com/google/error-prone/pull/3437 which contains a fix 😄.