redhat-developer / redhat-developer/vscode-java

When using a method reference with lambda, a @Nonnull warning will be prompted

Open
#4,451 1 comment 1 reaction 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
When using a method reference with lambda, a @Nonnull warning will be prompted

To Reproduce
Comparator.comparing(Class::getXxxx); Class::getXxxx warning

Environment

  • Operating System: Windows
  • JDK version: 25
  • Visual Studio Code version: 1.126.0
  • Java extension version: 1.55.0

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 warning in VS Code 1.126.0 with JDK 25 and Java extension 1.55.0 using Comparator.comparing(Class::getXxxx). Start by tracing the language-server diagnostic for the Class::getXxxx method reference. Done means the valid method reference no longer produces an incorrect @Nonnull warning, with coverage for the reported example.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.