Fix inverted condition

Found by Eclipse's static null value analyzer.

It makes no sense to set the value to 0 if it is not null. That way, null remains null (and will create a NPE in line 123), and all other values get overwritten by 0. Therefore, overwrite null by zero, fixing both warnings.
This commit is contained in:
Michael Schierl
2017-09-02 19:46:55 +02:00
committed by GitHub
parent f43d606f04
commit a1278b1d73
+1 -1
View File
@@ -118,7 +118,7 @@ public class IotaAPI extends IotaAPICore {
throw new InvalidSecurityLevelException();
}
start = start != null ? 0 : start;
start = start == null ? 0 : start;
if (start > end || end > (start + 500)) {
throw new ArgumentException();