Skip to content
Snippets Groups Projects
Commit ce6c0a03 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Fixed nullpointer

parent f0a8b9b7
Branches
Tags
1 merge request!1Master
......@@ -116,7 +116,10 @@ public class MamestraBrassicaeModel extends I18nImpl implements Model{
result.setValue(this.getModelId().toString(),"TMDD", dFormat.format(accumulatedDayDegrees));
// Set input data
result.setValue(CommonNamespaces.NS_WEATHER, "TJM10D", dFormat.format(((WeatherObservation)this.dataMatrix.getParamValueForDate(currentDate, DataMatrix.TJM10D)).getValue()));
if(this.dataMatrix.getParamValueForDate(currentDate, DataMatrix.TJM10D) != null)
{
result.setValue(CommonNamespaces.NS_WEATHER, "TJM10D", dFormat.format(((WeatherObservation)this.dataMatrix.getParamValueForDate(currentDate, DataMatrix.TJM10D)).getValue()));
}
result.setValue(CommonNamespaces.NS_WEATHER, "TMD", dFormat.format(((WeatherObservation)this.dataMatrix.getParamValueForDate(currentDate, DataMatrix.TMD)).getValue()));
retVal.add(result);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment