Skip to content
Snippets Groups Projects
Commit a49cb326 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

fix: Jackson deserialization to interface (depends on fix in VIPSCommon)

parent dbd561cf
Branches
Tags
No related merge requests found
...@@ -245,7 +245,7 @@ public class PsilaRosaeObservationModel extends I18nImpl implements Model{ ...@@ -245,7 +245,7 @@ public class PsilaRosaeObservationModel extends I18nImpl implements Model{
@Override @Override
public void setConfiguration(ModelConfiguration config) throws ConfigValidationException { public void setConfiguration(ModelConfiguration config) throws ConfigValidationException {
this.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); this.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
this.pestObservations = this.getObjectMapper().convertValue(config.getConfigParameter("pestObservations"), new TypeReference<List<ObservationImpl>>(){}); this.pestObservations = this.getObjectMapper().convertValue(config.getConfigParameter("pestObservations"), new TypeReference<List<Observation>>(){});
Collections.sort(this.pestObservations); Collections.sort(this.pestObservations);
// Setting timezone // Setting timezone
this.timeZone = TimeZone.getTimeZone((String) config.getConfigParameter("timeZone")); this.timeZone = TimeZone.getTimeZone((String) config.getConfigParameter("timeZone"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment