Remove Map null annotation workarounds (#8916)
These workarounds to prevent false positives can be removed now the EEAs allow for proper null analysis. Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -28,9 +28,9 @@ import org.eclipse.jdt.annotation.Nullable;
|
||||
@NonNullByDefault
|
||||
public class Forecast implements Comparable<Forecast> {
|
||||
private final ZonedDateTime validTime;
|
||||
private final Map<String, @Nullable BigDecimal> parameters;
|
||||
private final Map<String, BigDecimal> parameters;
|
||||
|
||||
public Forecast(ZonedDateTime validTime, Map<String, @Nullable BigDecimal> parameters) {
|
||||
public Forecast(ZonedDateTime validTime, Map<String, BigDecimal> parameters) {
|
||||
this.validTime = validTime;
|
||||
this.parameters = parameters;
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class Forecast implements Comparable<Forecast> {
|
||||
return validTime;
|
||||
}
|
||||
|
||||
public Map<String, @Nullable BigDecimal> getParameters() {
|
||||
public Map<String, BigDecimal> getParameters() {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.util.stream.Collectors;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
@@ -80,7 +79,7 @@ public class Parser {
|
||||
*/
|
||||
private static Forecast parseForecast(JsonObject object) {
|
||||
ZonedDateTime validTime = ZonedDateTime.parse(object.get("validTime").getAsString());
|
||||
Map<String, @Nullable BigDecimal> parameters = new HashMap<>();
|
||||
Map<String, BigDecimal> parameters = new HashMap<>();
|
||||
|
||||
JsonArray parameterArray = object.get("parameters").getAsJsonArray();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user