redhat-developer / redhat-developer/vscode-java
When using a method reference with lambda, a @Nonnull warning will be prompted
Open
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
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 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