Skip to content
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] JavaDoc for generated getter in nested inner class cannot be linked to from outer class #2502

Open
mirabilos opened this issue Jun 27, 2020 · 2 comments

Comments

@mirabilos
Copy link

mirabilos commented Jun 27, 2020

Describe the bug

I’m getting JavaDoc errors trying to link to an @Getter from a nested inner class.

To Reproduce

TestJavaDoc.java.zip

Running mvn org.apache.maven.plugins:maven-javadoc-plugin:jar@attach-javadocs results in:

[ERROR] /…/src/main/java/TestJavaDoc.java:22: error: reference not found
[ERROR]  * @return result; remember to call {@link Result#isValid()} before using!
[ERROR]                                            ^

My language level is 8 here, but I tried it with 11 as well (using maven-javadoc-plugin 3.2.0 with JDK 11 from Debian sid).

That {@link … was auto-completed by IntelliJ with the latest Lombok plugin installed, by the way, and the reference is correct when Ctrl-Q’d within IntelliJ.

Expected behavior

No JavaDoc error, the project compiles

Version info (please complete the following information):

  • Lombok version:
    <lombok.version>1.18.12</lombok.version>

  • Platform
    $ javadoc --version
    javadoc 11.0.7

Additional context

Just ask for what you need.

@Rawi01
Copy link
Collaborator

Rawi01 commented Jul 28, 2020

Lombok does not run during javadoc creation, thats why it can not find the getter. The recommended solution for this seems to be using delombok first and running javadoc on the generated result (https://projectlombok.org/features/all#running-delombok). If you don't care about the generated stuff you can also disable the javadoc checks.

mirabilos added a commit to qvest-digital/rfc822 that referenced this issue Oct 3, 2020
@mirabilos
Copy link
Author

@Rawi01 that’s not as easy as it sounds.

I now managed to do the delomboking only for Javadoc but now I have to add @return to the Javadoc of the slots because these are not synthetically generated, which IntelliJ automatically removes again

mirabilos added a commit to qvest-digital/rfc822 that referenced this issue Jan 13, 2021
(up to AddrSpec, where we run into lombok/javadoc issues:)
projectlombok/lombok#2502
mirabilos added a commit to qvest-digital/rfc822 that referenced this issue Jan 13, 2021
delombok output is NOT used for compilation but as javadoc input;
fixes: projectlombok/lombok#2502

from mewna/catnip#300 😼
mirabilos added a commit to qvest-digital/rfc822 that referenced this issue Jan 13, 2021
mirabilos added a commit to qvest-digital/rfc822 that referenced this issue Jan 13, 2021
mirabilos added a commit to qvest-digital/rfc822 that referenced this issue Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants