Java Rule ‘Null pointers should not be dereferenced’ and my sonar version is SonarLint IntelliJ 4.0.0.2916 I’m getting the following error java null exception specifically “fault in the next code when obj can’t be null in any scenario. Seems the analizer ...Read more
Java Rule ‘Null pointers should not be dereferenced’ and my sonar version is SonarLint IntelliJ 4.0.0.2916
I’m getting the following error java null exception specifically “fault in the next code when obj can’t be null in any scenario. Seems the analizer don’t recognice the logic with the funcional object Optional”.
final Obj obj = Optional.ofNullable(oldObj).orElse(new Obj());
if (obj.getSomeProperty() == null) {
Im using null to validate but why is this error “null pointers should not be dereferenced sonar” can anyone help me fix this error….
Read less