File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/ser Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ protected SerializationFeature getTimestampsFeature() {
219
219
return SerializationFeature .WRITE_DATES_AS_TIMESTAMPS ;
220
220
}
221
221
222
- protected boolean useTimestamp (SerializerProvider provider ) {
222
+ protected boolean useTimestamp (SerializerProvider ctxt ) {
223
223
if (_useTimestamp != null ) {
224
224
return _useTimestamp .booleanValue ();
225
225
}
@@ -232,8 +232,13 @@ protected boolean useTimestamp(SerializerProvider provider) {
232
232
}
233
233
}
234
234
// assume that explicit formatter definition implies use of textual format
235
- return (_formatter == null ) && (provider != null )
236
- && provider .isEnabled (getTimestampsFeature ());
235
+ return (_formatter == null ) && useTimestampFromGlobalDefaults (ctxt );
236
+ }
237
+
238
+ // @since 2.19
239
+ protected boolean useTimestampFromGlobalDefaults (SerializerProvider ctxt ) {
240
+ return (ctxt != null )
241
+ && ctxt .isEnabled (getTimestampsFeature ());
237
242
}
238
243
239
244
protected boolean _useTimestampExplicitOnly (SerializerProvider provider ) {
You can’t perform that action at this time.
0 commit comments