RFR: jsr166 integration 2018-06

Martin Buchholz martinrb at google.com
Fri Jun 22 17:45:32 UTC 2018


On Fri, Jun 22, 2018 at 10:28 AM, Paul Sandoz <paul.sandoz at oracle.com>
wrote:

>
> TimeUnit.java
>>
>       * is equivalent to
>       * {@code unit.convert(n, NANOSECONDS)}, and
>       * {@code unit.convert(Duration.of(n, unit.toChronoUnit()))}
>       * is equivalent to {@code n} (in the absence of overflow).
>       *
> +     * <p>This method differs from {@link Duration#toNanos()} in that
> +     * it does not throw {@link ArithmeticException} on numeric overflow.
> +     *
>
> Is that intended to be an api note?
>
>
Done.

--- src/main/java/util/concurrent/TimeUnit.java 10 Jun 2018 01:18:10 -0000
1.66
+++ src/main/java/util/concurrent/TimeUnit.java 22 Jun 2018 17:42:03 -0000
@@ -173,8 +173,9 @@
      * {@code unit.convert(Duration.of(n, unit.toChronoUnit()))}
      * is equivalent to {@code n} (in the absence of overflow).
      *
-     * <p>This method differs from {@link Duration#toNanos()} in that
-     * it does not throw {@link ArithmeticException} on numeric overflow.
+     * @apiNote
+     * This method differs from {@link Duration#toNanos()} in that it
+     * does not throw {@link ArithmeticException} on numeric overflow.
      *
      * @param duration the time duration
      * @return the converted duration in this unit,


More information about the core-libs-dev mailing list