redhat-developer / redhat-developer/vscode-java

org.eclipse.jdt.core.compiler.problem.potentialNullReference preference not taken into account

Open
#4,388 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
The value of org.eclipse.jdt.core.compiler.problem.potentialNullReference preference seems to not being taken into account.

To Reproduce
Steps to reproduce the behavior:

  1. Create a settings.prefs file
  2. Add following value to the just created prefs file:
org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
  1. In VSCode, under customizations/vscode/setting, set java.settings.url value pointing to the settings.prefs file just created.
  2. In the PROBLEMS view, any Potential null pointer access: The variable myVar may be null at this location error should disappear, but does not.

Expected behavior
The configuration is obeyed and the specified warnings disappear.

Environment

  • Operating System: DevContainer with mcr.microsoft.com/devcontainers/base Docker image on Debian WSL under Windows 11
  • JDK version: openjdk version "1.8.0_482" as Project Java version and openjdk version "25.0.2" 2026-01-20 LTS as the JVM to be used by the Java Language Server
  • Visual Studio Code version: 1.114.0
  • Java extension version: 1.53.0

Additional Information
Other configuration preferences seems to be working as expected. For example setting org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.deprecation=ignore removes any deprecation warning.

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

Reproduce the issue in VS Code with a settings.prefs file containing the potentialNullReference preference, then compare its handling with the deprecation preference, which reportedly works. Trace the Java extension or language-server configuration path for these preferences; done means setting potentialNullReference to ignore removes the reported potential-null warning.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.