diff --git a/datetime/src/main/java/tools/jackson/datatype/jsr310/deser/InstantDeserializer.java b/datetime/src/main/java/tools/jackson/datatype/jsr310/deser/InstantDeserializer.java index de781b85..18d619d7 100644 --- a/datetime/src/main/java/tools/jackson/datatype/jsr310/deser/InstantDeserializer.java +++ b/datetime/src/main/java/tools/jackson/datatype/jsr310/deser/InstantDeserializer.java @@ -169,24 +169,6 @@ protected InstantDeserializer(Class supportedType, _alwaysAllowStringifiedDateTimestamps = readNumericStringsAsTimestamp; } - /** - * @deprecated Since 2.16, use {@link #InstantDeserializer(Class,DateTimeFormatter, - * Function,Function,Function,BiFunction,boolean,boolean,boolean)} instead. - */ - @Deprecated() - protected InstantDeserializer(Class supportedType, - DateTimeFormatter formatter, - Function parsedToValue, - Function fromMilliseconds, - Function fromNanoseconds, - BiFunction adjust, - boolean replaceZeroOffsetAsZ - ) { - this(supportedType, formatter, parsedToValue, fromMilliseconds, fromNanoseconds, - adjust, replaceZeroOffsetAsZ, - DEFAULT_NORMALIZE_ZONE_ID, DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS); - } - @SuppressWarnings("unchecked") protected InstantDeserializer(InstantDeserializer base, DateTimeFormatter f) { diff --git a/datetime/src/main/java/tools/jackson/datatype/jsr310/util/DecimalUtils.java b/datetime/src/main/java/tools/jackson/datatype/jsr310/util/DecimalUtils.java index ca386ac7..15f022af 100644 --- a/datetime/src/main/java/tools/jackson/datatype/jsr310/util/DecimalUtils.java +++ b/datetime/src/main/java/tools/jackson/datatype/jsr310/util/DecimalUtils.java @@ -26,12 +26,9 @@ * Utilities to aid in the translation of decimal types to/from multiple parts. * * @author Nick Williams - * @since 2.2 */ public final class DecimalUtils { - private static final BigDecimal ONE_BILLION = new BigDecimal(1_000_000_000L); - private DecimalUtils() { } public static String toDecimal(long seconds, int nanoseconds) @@ -81,8 +78,6 @@ public static String toDecimal(long seconds, int nanoseconds) /** * Factory method for constructing {@link BigDecimal} out of second, nano-second * components. - * - * @since 2.8 */ public static BigDecimal toBigDecimal(long seconds, int nanoseconds) { @@ -97,24 +92,10 @@ public static BigDecimal toBigDecimal(long seconds, int nanoseconds) return NumberInput.parseBigDecimal(toDecimal(seconds, nanoseconds)); } - /** - * @deprecated due to potential unbounded latency on some JRE releases. - */ - @Deprecated // since 2.9.8 - public static int extractNanosecondDecimal(BigDecimal value, long integer) - { - // !!! 14-Mar-2016, tatu: Somewhat inefficient; should replace with functionally - // equivalent code that just subtracts integral part? (or, measure and show - // there's no difference and do nothing... ) - return value.subtract(BigDecimal.valueOf(integer)).multiply(ONE_BILLION).intValue(); - } - /** * Extracts the seconds and nanoseconds component of {@code seconds} as {@code long} and {@code int} * values, passing them to the given converter. The implementation avoids latency issues present * on some JRE releases. - * - * @since 2.9.8 */ public static T extractSecondsAndNanos(BigDecimal seconds, BiFunction convert) { diff --git a/datetime/src/test/java/tools/jackson/datatype/jsr310/TestDecimalUtils.java b/datetime/src/test/java/tools/jackson/datatype/jsr310/TestDecimalUtils.java index 897aa9a6..e94de2b4 100644 --- a/datetime/src/test/java/tools/jackson/datatype/jsr310/TestDecimalUtils.java +++ b/datetime/src/test/java/tools/jackson/datatype/jsr310/TestDecimalUtils.java @@ -35,14 +35,10 @@ public void testToDecimal01() "-22704862.599000000", decimal); } - @SuppressWarnings("deprecation") private void checkExtractNanos(long expectedSeconds, int expectedNanos, BigDecimal decimal) { long seconds = decimal.longValue(); assertEquals("The second part is not correct.", expectedSeconds, seconds); - - int nanoseconds = DecimalUtils.extractNanosecondDecimal(decimal, seconds); - assertEquals("The nanosecond part is not correct.", expectedNanos, nanoseconds); } @Test