redhat-developer / redhat-developer/vscode-java
ctor code snippet in nested class generates invalid constructor
Open
Nobody has claimed this yet.
code action
codegen
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
ctor code snippet used in nested class is generating constructor for encapsulating public class.
Environment
- Operating System: Win 11
- JDK version: openjdk 11.0.12 2021-07-20
- Visual Studio Code version: 1.67.2
- Java extension version: v1.6.0
public class CoinChange {
private class CacheKey {
// ctor invoked, generates this invalid constructor:
public CoinChange() {
super();
}
}
}

Contributor guide
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 ctor snippet in the nested CacheKey example using the reported Java extension setup. Trace the constructor-generation entry point for nested classes; done means the generated constructor targets CacheKey rather than the enclosing CoinChange class and produces valid Java.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100