File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
main/java/com/fasterxml/jackson/datatype/jsr310/deser
test/java/com/fasterxml/jackson/datatype/jsr310/deser Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -61,12 +61,13 @@ public class InstantDeserializer<T extends Temporal>
6161 = JavaTimeFeature .ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS .enabledByDefault ();
6262
6363 /**
64- * Constants used to check if ISO 8601 time string is colonless . See [jackson-modules-java8#131]
64+ * Constants used to check if ISO 8601 time string is colon-less . See [jackson-modules-java8#131]
6565 *
6666 * @since 2.13
6767 */
6868 protected static final Pattern ISO8601_COLONLESS_OFFSET_REGEX = Pattern .compile ("[+-][0-9]{4}(?=\\ [|$)" );
6969
70+ // @since 2.18.2
7071 private static OffsetDateTime decimalToOffsetDateTime (FromDecimalArguments args ) {
7172 // [jackson-modules-java8#308] Since 2.18.2 : Fix can't deserialize OffsetDateTime.MIN: Invalid value for EpochDay
7273 if (args .integer == OffsetDateTime .MIN .toEpochSecond () && args .fraction == OffsetDateTime .MIN .getNano ()) {
Original file line number Diff line number Diff line change @@ -805,8 +805,7 @@ public void testDeserializationNoAdjustIfMAX() throws Exception
805805
806806 // [jackson-modules-java8#308] Can't deserialize OffsetDateTime.MIN: Invalid value for EpochDay
807807 @ Test
808- public void testOffsetDateTimeMinOrMax ()
809- throws Exception
808+ public void testOffsetDateTimeMinOrMax () throws Exception
810809 {
811810 _testOffsetDateTimeMinOrMax (OffsetDateTime .MIN );
812811 _testOffsetDateTimeMinOrMax (OffsetDateTime .MAX );
@@ -815,9 +814,8 @@ public void testOffsetDateTimeMinOrMax()
815814 private void _testOffsetDateTimeMinOrMax (OffsetDateTime offsetDateTime )
816815 throws Exception
817816 {
818- ObjectMapper mapper = newMapper ();
819- String ser = mapper .writeValueAsString (offsetDateTime );
820- OffsetDateTime result = mapper .readValue (ser , OffsetDateTime .class );
817+ String ser = MAPPER .writeValueAsString (offsetDateTime );
818+ OffsetDateTime result = MAPPER .readValue (ser , OffsetDateTime .class );
821819 assertIsEqual (offsetDateTime , result );
822820 }
823821
You can’t perform that action at this time.
0 commit comments