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

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

parent e80679f7
Branches
Tags
1 merge request!1Fix compilation error after Jackson update
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
target/ target/
classes/ classes/
.idea/
...@@ -63,7 +63,7 @@ public class DeliaRadicumFloralisObservationModel extends I18nImpl implements Mo ...@@ -63,7 +63,7 @@ public class DeliaRadicumFloralisObservationModel extends I18nImpl implements Mo
private ObjectMapper objectMapper; private ObjectMapper objectMapper;
private List<ObservationImpl> pestObservations; private List<Observation> pestObservations;
private TimeZone timeZone; private TimeZone timeZone;
private Date startDateGrowth; private Date startDateGrowth;
private Date endDateCalculation; private Date endDateCalculation;
...@@ -260,7 +260,7 @@ public class DeliaRadicumFloralisObservationModel extends I18nImpl implements Mo ...@@ -260,7 +260,7 @@ public class DeliaRadicumFloralisObservationModel extends I18nImpl implements Mo
@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