redhat-developer / redhat-developer/vscode-java

Removing VSCode Java added annotations

Open
#3,036 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

I'm using VSCode with a Java project and whenever I use it to generate code (i.e. implement unimplemented methods, extract variable etc.) it will add the following annotations (sometimes other):

  • UnknownKeyFor
  • NonNull
  • Initialized

I would like to disable those but I can't find which extension does that nor can I find where that happens in the codebase.
Does anyone know where these are added in the codebase or where can this behavior be disabled?

enter image description here

Contributor guide

Open the contributing guide

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

Start by tracing the VSCode Java extension's code-generation path, since the issue names no source file or test. Identify which component adds UnknownKeyFor, NonNull, and Initialized, then determine whether an existing setting controls them. Done means the annotations can be disabled without affecting other generated Java code, with a regression test or documented configuration path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.