- Operating system: Windows 11 pro 22H2
- SonarLint plugin version: 126.96.36.199471
- Programming language you’re coding in: Java
- Is connected mode used:
- Connected to SonarCloud or SonarQube (and which version): SonarQube Developer Edition Version 9.6 (build 59041)
I’m getting a null pointer alert inside a condition that checks for that same null pointer.
I’m using org.springframework:spring-web RestTemplate to perform an API call, and if I manage to get a response I’m checking that the body is not null. I then try to use that body for logging purposes, but sonar reports the body as nullable, although I’m explicitly checking that it is not.
Any assistance will be much appreciated. Thanks!