Skip to content

Commit 9d91f80

Browse files
committed
Clean up changes
1 parent 0b66fde commit 9d91f80

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,12 @@ public class InstantDeserializer<T extends Temporal>
6767
*/
6868
protected static final Pattern ISO8601_COLONLESS_OFFSET_REGEX = Pattern.compile("[+-][0-9]{4}(?=\\[|$)");
6969

70-
/**
71-
*
72-
* @param args
73-
* @return
74-
*/
7570
private static OffsetDateTime decimalToOffsetDateTime(FromDecimalArguments args) {
76-
// [jackson-modules-java8#308] Fix can't deserialize OffsetDateTime.MIN: Invalid value for EpochDay
71+
// [jackson-modules-java8#308] Since 2.18.2 : Fix can't deserialize OffsetDateTime.MIN: Invalid value for EpochDay
7772
if (args.integer == OffsetDateTime.MIN.toEpochSecond() && args.fraction == OffsetDateTime.MIN.getNano()) {
7873
return OffsetDateTime.ofInstant(Instant.ofEpochSecond(OffsetDateTime.MIN.toEpochSecond(), OffsetDateTime.MIN.getNano()), OffsetDateTime.MIN.getOffset());
7974
}
80-
// [jackson-modules-java8#308] For OffsetDateTime.MAX case
75+
// [jackson-modules-java8#308] Since 2.18.2 : For OffsetDateTime.MAX case
8176
if (args.integer == OffsetDateTime.MAX.toEpochSecond() && args.fraction == OffsetDateTime.MAX.getNano()) {
8277
return OffsetDateTime.ofInstant(Instant.ofEpochSecond(OffsetDateTime.MAX.toEpochSecond(), OffsetDateTime.MAX.getNano()), OffsetDateTime.MAX.getOffset());
8378
}
@@ -560,16 +555,5 @@ public static class FromDecimalArguments // since 2.8.3
560555
this.fraction = fraction;
561556
this.zoneId = zoneId;
562557
}
563-
564-
public static boolean matches(FromDecimalArguments a, FromDecimalArguments b) {
565-
if (a == b) {
566-
return true;
567-
}
568-
if (a == null || b == null) {
569-
return false;
570-
}
571-
return a.integer == b.integer && a.fraction == b.fraction
572-
&& a.zoneId.equals(b.zoneId);
573-
}
574558
}
575559
}

0 commit comments

Comments
 (0)