Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Model_DELIARFOBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
Models
Java
Model_DELIARFOBS
Commits
e22bc536
Commit
e22bc536
authored
2 years ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
fix: Jackson deserialization to interface (depends on fix in VIPSCommon)
parent
e80679f7
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1
Fix compilation error after Jackson update
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
src/main/java/no/nibio/vips/model/deliaradicumfloralisobservationmodel/DeliaRadicumFloralisObservationModel.java
+2
-2
2 additions, 2 deletions
...bservationmodel/DeliaRadicumFloralisObservationModel.java
with
3 additions
and
2 deletions
.gitignore
+
1
−
0
View file @
e22bc536
target/
target/
classes/
classes/
.idea/
This diff is collapsed.
Click to expand it.
src/main/java/no/nibio/vips/model/deliaradicumfloralisobservationmodel/DeliaRadicumFloralisObservationModel.java
+
2
−
2
View file @
e22bc536
...
@@ -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
<
Observation
Impl
>
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
<
Observation
Impl
>>(){});
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"
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment