redhat-developer / redhat-developer/vscode-java
Null type safety not working with jakarta.validation.constraints.NotNull
Ouverte
@snjeza y travaille déjà.
Depuis le 20/2/2024.
upstream
- Langage dominant
- TypeScript
- Étoiles
- 2.3k
- Forks
- 546
- Merge moyen
- 20 h 1 min
- PR mergées (30 j)
- 11
Description
[provide a description of the issue]
Environment
- Operating System: Linux Ubuntu 22.04
- JDK version: 17.0.8 (Oracle GraalVM 17.0.8+9.1 build 17.0.8+9-LTS-jvmci-23.0-b14)
- Visual Studio Code version: 1.86.2
- Java extension version: v1.28.1
Steps To Reproduce
- Create a method with
org.springframework.lang.NonNullannotation - Calls that method with arguments annotated with
jakarta.validation.constraints.NotNull - A yellow line shows up on the method call highlighting:
Null type safety: The expression of type 'String' needs unchecked conversion to conform to '@NonNull String'Java(16778128)
[Please attach a sample project reproducing the error]
Here:
warnings-bug.zip
Please attach logs
Here:
warning-logs.log
Current Result
VS Code says it could be null, it may have null value.
Expected Result
No warnings at all, since it was annotated with NotNull;
Additional Informations
None
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Évaluation
Cette issue n'a pas encore été évaluée.