Closed climategadgets closed 12 months ago
No Sonar nagging, voting can rightfully be null there and a null value is acceptable
voting
Sonar complains
As of rev. 8943b351376d9256b7568b1e692009d1cfc15319:
return new ZoneSettings( enabled == null || enabled, setpoint, voting == null || voting,
^^^ A "NullPointerException" could be thrown; "voting" is nullable here.
null, dumpPriority == null ? 0: dumpPriority);
Verify and either correct the problem or shut Sonar up
No, Sonar is stupid. As of rev. bf871b30c38ff35d2f6fb3b279c698eb2aae8c90, it now complains about enabled as well.
enabled
Verdict: Sonar is dumb often.
Expected Behavior
No Sonar nagging,
voting
can rightfully be null there and a null value is acceptableActual Behavior
Sonar complains
As of rev. 8943b351376d9256b7568b1e692009d1cfc15319:
^^^ A "NullPointerException" could be thrown; "voting" is nullable here.
Corrective Action
Verify and either correct the problem or shut Sonar up