SonarQube for IntelliJ plugin version: 10.22.0.81244
IntelliJ version: IntelliJ IDEA 2024.3.5
Programming language you’re coding in: Java
Is connected mode used: No
SonarQube is incorrectly recognizing a rule java:S2259 in my code, because it does not know that ObjectUtils.isEmpty(mockObject) checks whether the ‘mockObject’ is null. It thinks that mockObject could still be null, even after the ObjectUtils.isEmpty check.