Use of eclipse external annotations (EEA) can cause false positive warning: Null type safety: generic needs unchecked conversion to conform to @NonNull type. #1008
Labels
null
Issues related to null pointer analysis
Use of eclipse external annotations (EEA) can cause false positive warning: Null type safety: generic needs unchecked conversion to conform to @nonnull type.
Environment
Eclipse IDE for Enterprise Java and Web Developers
Version: 2023-03 (4.27.0)
Build id: 20230309-1520
OS: Linux Mint 21.1 Cinnamon
Project is set to compile using Java 1.8, although I'm not sure it matters.
Issue
Just as the title says. Most easily demonstrated in code.
However, note first that I have the Integer.valueOf(String) method annotated in EEA as both taking and returning NonNull. Specifically in the file
<path-to-eea-directory>/java/lang/Integer.eea
:Now for the code:
EDIT: Just a note that this warning is generated when the following Java compiler warning is enabled: Unchecked conversion from non-annotated type to
@NonNull
type.The text was updated successfully, but these errors were encountered: