Skip to content

@Builder annotation fails to work with multi-line comments on fields #1402

Description

@zjzhu-hub

Environment:

  • VS Code Version: cursor 0.45.11
  • Extension Version: 0.29.0
  • JDK Type & Version: oracle jdk version: 21
  • OS Type & Version:

Step to Reproduce:
When using the @builder annotation, if a field has a multi-line comment (/** xx **/), the editor extension fails to generate the builder method, making it unusable. However, if the comment is changed to a single-line comment (// xx), the builder method works as expected.

Image

Image

Expected Behavior:
The @Builder annotation should work as expected even when fields have multi-line comments (/** xx **/), and the builder method should be generated and usable.

Actual Behavior:
The actual behavior is that when using the @builder annotation with multi-line comments (/** xx **/) above the fields, the editor continuously reports an error, preventing the builder from being generated and used. However, if the comments are removed or changed to single-line comments (// xx), the builder works as expected and the error disappears.

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions