Skip to content

On Nonnull Annotation Setting #2779

Open

Description

I found annotation based nonnull analysis was added from version 1.11.0. The README says there are two configurations java.compile.nullAnalysis.nonnull and java.compile.nullAnalysis.nullable in .vscode/settings.json .

When I read #1693 I also found we can set org.eclipse.jdt.core.compiler.annotation.nonnull and etc in the setting file specified by java.settings.url.

If I set both of them, which one will be used?

In addition, if I set org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault in the the file of java.settings.url, I got expected null check behaviour. Is there any equivalent direct setting in .vscode/settings.json ?

Environment
  • Operating System: Ubuntu 22.04
  • JDK version: OpenJDK 64-Bit Server VM (build 17.0.4+8-Ubuntu-122.04, mixed mode, sharing)
  • Visual Studio Code version: 1.73.0
  • Java extension version: 1.12.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions