Skip to content

Commit 9019677

Browse files
committed
Improve Javadocs wrt #3260 to try to indicate internal nature of StdDateFormat
1 parent d51ec44 commit 9019677

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/main/java/com/fasterxml/jackson/databind/util/StdDateFormat.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,15 @@
1212
import com.fasterxml.jackson.core.io.NumberInput;
1313

1414
/**
15-
* Default {@link DateFormat} implementation used by standard Date
16-
* serializers and deserializers. For serialization defaults to using
15+
* Jackson's internal {@link DateFormat} implementation used by standard Date
16+
* serializers and deserializers to implement default behavior: does <b>NOT</b>
17+
* fully implement all aspects expected by {@link DateFormat} and as a consequence
18+
* <b>SHOULD NOT</b> to be used by code outside core Jackson databind functionality.
19+
* In particular, {@code ParsePosition} argument of {@link #parse(String, ParsePosition)}
20+
* and {@link #format(Date, StringBuffer, FieldPosition)} methods is fully ignored;
21+
* Jackson itself never calls these methods.
22+
*<p>
23+
* For serialization defaults to using
1724
* an ISO-8601 compliant format (format String "yyyy-MM-dd'T'HH:mm:ss.SSSZ")
1825
* and for deserialization, both ISO-8601 and RFC-1123.
1926
*<br>
@@ -25,6 +32,9 @@
2532
* Note that it is possible to enable/disable use of colon in time offset by using method
2633
* {@link #withColonInTimeZone} for creating new differently configured format instance,
2734
* and configuring {@code ObjectMapper} with it.
35+
*<p>
36+
* TODO: in Jackson 2.14 or later, should change behavior to fail if {@link ParsePosition}
37+
* is specified by caller (at least with non-0 offset).
2838
*/
2939
@SuppressWarnings("serial")
3040
public class StdDateFormat

0 commit comments

Comments
 (0)