-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] @Builder methods do not copy javadoc #2481
Comments
The PR you mentioned added support for delombok/javac and doesn't change anything eclipse related. I can confirm that it doesn't work in eclipse. I also tried to find a feature that successfully copies javadoc but it seems to be broken or I did something wrong. I will check if I can figure out how this stuff works. |
I just tested using delombok, and it works for the first described situation ( |
Seems like you are right. /**
* @param number Comment on Constructor
* @return {@code this}.
*/
public Test2.Test2Builder number(final int number) {
this.number = number;
return this;
} Is that the behaviour you would expect? |
Yes, that is exactly what I expect. |
Working on it right now, should be done soon |
Describe the bug
@Builder
on a class while having a javadoc comment on a field, the resulting builder method does not show the javadoc of the field. (Delombok generates a javadoc comment in this case.)@Builder
on a constructor while having a javadoc comment on a constructor parameter, the resulting builder method does not show the javadoc of the parameter. (Neither Delombok not the Eclipse agent generate a javadoc comment in this case.)To Reproduce
@Builder
on class:@Builder
on constructor:Expected behavior
@Builder
on a class while having a javadoc comment on a field, the resulting builder method should have a javadoc comment which contains the javadoc of the field. This should be consistent with the delombok behaviour (which generates a javadoc comment from the field's javadoc).@Builder
on a constructor while having a javadoc comment on a constructor parameter, the resulting builder method should have a javadoc comment which contains the javadoc of the parameter. This seems to be completely missing - neither delombok nor the Eclipse agent generate javadoc in this case.(It would also be OK if the javadoc comment of the identically-named field was copied, but that seems somewhat sloppy. Most of the time, there's a reason to use
@Builder
on the constructor, so the information should come from there.)Version info (please complete the following information):
Additional context
I know that #2008 should have addressed this issue and was baffled when I learned that it doesn't work - at least for me. I also read through #1033 and #1445 but didn't find out how I may have failed, but I'm not a Lombok expert, so please tell me if I missed something!
The text was updated successfully, but these errors were encountered: