Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

[BUG] Errorprone compatibility with Lombok JavaDoc checks on JDK 25 #3940

Open

Description

@asheldon

Describe the bug
With JDK 25 EA, Lombok 1.18.40 and ErrorProne, ErrorProne's JavaDoc-related checks fail with Lombok-generated code with errors like

[javac]           error-prone version: 2.36.0
[javac]           BugPattern: (see stack trace)
[javac]           Stack Trace:
[javac]           java.lang.AbstractMethodError: Receiver class lombok.javac.Javac$JavadocOps_8$1 does not define or inherit an implementation of the resolved method 'abstract com.sun.tools.javac.parser.Tokens$Comment stripIndent()' of interface com.sun.tools.javac.parser.Tokens$Comment.
[javac]            at jdk.compiler/com.sun.tools.javac.parser.DocCommentParser.<init>(DocCommentParser.java:168)
[javac]            at jdk.compiler/com.sun.tools.javac.parser.DocCommentParser.<init>(DocCommentParser.java:146)
[javac]            at jdk.compiler/com.sun.tools.javac.api.JavacTrees.getDocCommentTree(JavacTrees.java:1132)
[javac]            at jdk.compiler/com.sun.tools.javac.parser.LazyDocCommentTable.getCommentTree(LazyDocCommentTable.java:101)
[javac]            at jdk.compiler/com.sun.tools.javac.api.JavacTrees.getDocCommentTree(JavacTrees.java:757)
[javac]            at com.google.errorprone.bugpatterns.javadoc.Utils.getDocCommentTree(Utils.java:132)
[javac]            at com.google.errorprone.bugpatterns.javadoc.Utils.getDocTreePath(Utils.java:124)
[javac]            at com.google.errorprone.bugpatterns.javadoc.InvalidBlockTag.matchVariable(InvalidBlockTag.java:93)

I'm uncertain if this should be filed as an issue against Lombok, ErrorProne, or just considered an unfortunate incompatibility.

I've observed this with the following ErrorProne checks:

  • AlmostJavadoc
  • EscapedEntity
  • InheritDoc
  • InvalidBlockTag
  • InvalidInlineTag
  • InvalidLink
  • MalformedInlineTag

To Reproduce

I haven't attempted to create a minimal reproducer. I am opening this issue first to discuss what you think of this incompatibility with ErrorProne and JDK 25 in principle. I also haven't filed an issue against ErrorProne. If you think it is more appropriate to fix in ErrorProne, I can open a ticket with that project instead.

Expected behavior
Maybe the Lombok-generated JavadocOps_8 can implement abstract com.sun.tools.javac.parser.Tokens$Comment stripIndent() to prevent this issue?

Version info (please complete the following information):

  • Lombok version (1.18.40)
  • Platform JDK 25 EA

Additional context
I'm opening this issue primarily to discuss it before taking further action on it.

Activity

  1. asheldon commented on Sep 15, 2025

    @asheldon
    Author
    diff --git a/src/utils/lombok/javac/Javac.java b/src/utils/lombok/javac/Javac.java
    index 08c13cc4..779a526a 100644
    --- a/src/utils/lombok/javac/Javac.java
    +++ b/src/utils/lombok/javac/Javac.java
    @@ -387,6 +387,10 @@ public class Javac {
                                    @Override public DiagnosticPosition getPos() {
                                            return field;
                                    }
    +
    +                               public Comment stripIndent() {
    +                                       return this;
    +                               }
                            };
                    }
            }
    

    This appears adequate to prevent Error Prone from crashing.

  2. self-assigned this
    on Sep 16, 2025
  3. Rawi01 commented on Sep 16, 2025

    @Rawi01
    Collaborator

    @asheldon Thanks for the report and for a diff to fix the issue. I hope I can add a test case to catch it earlier next time.

  4. added a commit that references this issue on Sep 16, 2025
    95df6df
  5. added a commit that references this issue on Sep 17, 2025
    3bd1bba
  6. added this to the next-version milestone on Sep 17, 2025
  7. tarskiandhutch commented on Sep 23, 2025

    @tarskiandhutch

    Just for the record, I'm seeing ErrorProne error out with Lombok 1.18.38 as well.

    Still JDK 25 and ErrorProne 2.36.0.

  8. sergey-morenets commented on Sep 29, 2025

    @sergey-morenets

    Still reproduces with Lombok 1.18.42

  9. andrey-borisov-patrianna commented on Sep 30, 2025

    @andrey-borisov-patrianna

    JDK: 25
    lombok: 1.18.42
    error_prone: 1.18.42

    fails as before, same as @sergey-morenets mentioning

  10. changed the title [-][BUG] Errorprone compatibility with Lombok on JDK 25[/-] [+][BUG] Errorprone compatibility with Lombok JavaDoc checks on JDK 25[/+] on Sep 30, 2025
  11. asheldon commented on Sep 30, 2025

    @asheldon
    Author

    I've changed the title of this issue to capture that it was specifically about the JavaDoc-related checks with JDK25 and not a general issue about Lombok + Error prone + JDK 25 compatibility.

  12. added a commit that references this issue on Oct 1, 2025
  13. rzwitserloot commented on Oct 2, 2025

    @rzwitserloot
    Collaborator

    It sounds like the next step is a simple and reliable reproduction recipe.

  14. andrey-borisov-patrianna commented on Oct 2, 2025

    @andrey-borisov-patrianna
    
    import java.util.Set;
    
    import lombok.Getter;
    import lombok.RequiredArgsConstructor;
    
    @RequiredArgsConstructor
    @Getter
    public enum MyType {
        FOO("foo", Set.of("a", "b", "c")),
        ZOO("zoo", Set.of("a", "b", "c"));
    
        private final String code;
    
        /**
         * Set of required fields that must be present in the somewhere.
         */
        private final Set<String> requiredFields;
    }
    

    JDK: 25
    lombok: 1.18.42
    error_prone: 1.18.42

  15. Taha-Saifee53 commented on Jan 24, 2026

    @Taha-Saifee53

    Issue with getter and setter with java 25.

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.14.1:compile (default-compile) on project thymeleaf-bank-application: Compilation failure: Compilation failure:
    variable bankService not initialized in the default constructor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions