diff --git a/src/main/java/no/nibio/vips/entity/WeatherObservation.java b/src/main/java/no/nibio/vips/entity/WeatherObservation.java index 6434b5ada3f1742e3baab9128a7f853b54040a5d..7a12c684ff06ce441a2b4e8bc25cec55b1672ed7 100755 --- a/src/main/java/no/nibio/vips/entity/WeatherObservation.java +++ b/src/main/java/no/nibio/vips/entity/WeatherObservation.java @@ -46,7 +46,7 @@ public class WeatherObservation implements Comparable{ private String elementMeasurementTypeId; private Integer logIntervalId; private Date timeMeasured; - private double value; + private Double value; /** Creates a new instance of WeatherObservation */ public WeatherObservation() { @@ -134,14 +134,14 @@ public class WeatherObservation implements Comparable{ /** * @return the value */ - public double getValue() { + public Double getValue() { return value; } /** * @param value the value to set */ - public final void setValue(double value) { + public final void setValue(Double value) { this.value = value; } diff --git a/src/main/java/no/nibio/vips/util/WeatherUtil.java b/src/main/java/no/nibio/vips/util/WeatherUtil.java index 8168a3e295da0826da84f93a7605433b503e20ba..956a3a7ec10692441d301551444b01279daba511 100755 --- a/src/main/java/no/nibio/vips/util/WeatherUtil.java +++ b/src/main/java/no/nibio/vips/util/WeatherUtil.java @@ -702,7 +702,7 @@ public class WeatherUtil { wind2m.get(0).getValue(), globalRadiation.get(0).getValue() ); - Integer precedingLeafWetnessValue = precedingLeafWetness != null ? (int) precedingLeafWetness.getValue() : 0; + Integer precedingLeafWetnessValue = precedingLeafWetness != null ? precedingLeafWetness.getValue().intValue() : 0; // Iterating list with index (instead of using Iterator pattern) has // performance gains on very long lists for(int i=1;i<temperature.size();i++)