microsoft / microsoft/vscode-java-pack
@Builder annotation fails to work with multi-line comments on fields
Nobody has claimed this yet.
- 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.
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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