-
Notifications
You must be signed in to change notification settings - Fork 85
Closed
Milestone
Description
If you create a Serializer (for example LocalTimeSerializer) with a String shape preference, this preference get discarded at this point
Line 89 in 8618915
if ((format != _format) || (shapeOverride != _shapeOverride)) { |
example
class DTO {
LocalTime timeIn;
}
Configure Module
module.addSerializer(LocalTime.class, new LocalTimeShapedDeserializer(
new JacksonJodaDateFormat(ISODateTimeFormat.hourMinute()), 1));
When the above DTO is serialized, the time is rendered [ hh, mm, sec, ms ] instead of the desired and configured way
The fact that the LocalTime.class serializer has been created to use the string shape (in this instance "hh:mm") gets ignored and in the above code
} else {
useTimestamp = null;
shapeOverride = 0; // should this not be set to _shapeOverride??
}
// must not call if flag defined, to rely on defaults:
if (useTimestamp != null) {
format = format.withUseTimestamp(useTimestamp);
}
format = format.with(ann);
if ((format != _format) || (shapeOverride != _shapeOverride)) {
return withFormat(format, shapeOverride);
}
Metadata
Metadata
Assignees
Labels
No labels