microsoft / microsoft/vscode-java-pack

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

Open
#1,402 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged bug lombok
Dominant language
TypeScript
Stars
352
Forks
166
Avg merge
17h 47m
Merged PRs (30d)
32

Description

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:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the VS Code Java extension using JDK 21 with @Builder and a field-level multi-line comment, then compare it with a single-line comment. Trace the builder-generation error path and identify where the comment changes parsing or generation behavior. Done means the builder is generated and usable in both cases, with a regression test covering the multi-line comment.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.