Closed kurtraschke closed 6 years ago
It seems like the root cause lies somewhere in onebusaway-csv-entities
- I can't find anywhere where it actually makes use of the default value. The closest we get is in AbstractFieldMapping.isMissing()
, but presumably there needs to be something in DefaultFieldMapping.translateFromCSVToObject()
which actually uses the default value.
Summary:
A field annotated with
@CsvField(optional = true, defaultValue = "foo")
in a class which implementsGtfsTransformStrategy
is not injected with the default value, if a value is not specified in the transform JSON which invokes the class (i.e. as described here).Steps to reproduce:
GtfsTransformStrategy
in a class.@CsvField(optional = true, defaultValue = "foo")
.Expected behavior:
The field should be injected with the default value.
Observed behavior:
The field is not injected, and remains
null
.Platform: