Upcoming Webinar!
Delivering High-Quality and Secure AI Code with SonarQube - Register Now!
Sonar Community
Optional.ofNullable(null).orElse is reported as a potential NPE
Rules and Languages
Report False-positive / False-negative...
java
,
sonarqube
system
(system) Closed
February 21, 2022, 9:20am
8
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
show post in topic
Related topics
Topic
Replies
Views
Activity
False Positive on `optional.orElse(null)`
Report False-positive / False-negative...
java
,
sonarqube
,
false-positive
17
3254
March 25, 2025
A "NullPointerException" could be thrown; "ofNullable()" can return null
SonarQube Server / Community Build
4
96
March 17, 2025
FP java:S2637 for NonNull return type used in Optional.map(...).orElse(null)
Report False-positive / False-negative...
java
2
1755
January 13, 2022
java:S5411 complains about use of boxed boolean even though it cannot be null
Report False-positive / False-negative...
java
,
false-positive
2
30
January 10, 2025
org.springframework.lang.Nullable is ignored in nullability analysis
Report False-positive / False-negative...
java
6
1115
May 3, 2021