Skip to content

Commit

Permalink
Minor style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Nov 18, 2024
1 parent 54fe027 commit 7b96f8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ public class InstantDeserializer<T extends Temporal>
= JavaTimeFeature.ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS.enabledByDefault();

/**
* Constants used to check if ISO 8601 time string is colonless. See [jackson-modules-java8#131]
* Constants used to check if ISO 8601 time string is colon-less. See [jackson-modules-java8#131]
*
* @since 2.13
*/
protected static final Pattern ISO8601_COLONLESS_OFFSET_REGEX = Pattern.compile("[+-][0-9]{4}(?=\\[|$)");

// @since 2.18.2
private static OffsetDateTime decimalToOffsetDateTime(FromDecimalArguments args) {
// [jackson-modules-java8#308] Since 2.18.2 : Fix can't deserialize OffsetDateTime.MIN: Invalid value for EpochDay
if (args.integer == OffsetDateTime.MIN.toEpochSecond() && args.fraction == OffsetDateTime.MIN.getNano()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,7 @@ public void testDeserializationNoAdjustIfMAX() throws Exception

// [jackson-modules-java8#308] Can't deserialize OffsetDateTime.MIN: Invalid value for EpochDay
@Test
public void testOffsetDateTimeMinOrMax()
throws Exception
public void testOffsetDateTimeMinOrMax() throws Exception
{
_testOffsetDateTimeMinOrMax(OffsetDateTime.MIN);
_testOffsetDateTimeMinOrMax(OffsetDateTime.MAX);
Expand All @@ -815,9 +814,8 @@ public void testOffsetDateTimeMinOrMax()
private void _testOffsetDateTimeMinOrMax(OffsetDateTime offsetDateTime)
throws Exception
{
ObjectMapper mapper = newMapper();
String ser = mapper.writeValueAsString(offsetDateTime);
OffsetDateTime result = mapper.readValue(ser, OffsetDateTime.class);
String ser = MAPPER.writeValueAsString(offsetDateTime);
OffsetDateTime result = MAPPER.readValue(ser, OffsetDateTime.class);
assertIsEqual(offsetDateTime, result);
}

Expand Down

0 comments on commit 7b96f8b

Please sign in to comment.