Timestamp.from(Instant) should throw when conversion is not possible

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 23
    • Affects Version/s: 8u25
    • Component/s: core-libs
    • b04
    • x86_64
    • linux_ubuntu
    • Verified

      FULL PRODUCT VERSION :
      java version "1.8.0_25"
      Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
      Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
      java version "1.8.0_25"
      Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
      Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)


      A DESCRIPTION OF THE PROBLEM :
      Timestamp.from(Instant.MIN)
      gives 169108098-07-04 06:51:43.0
      - should throw IllegalArgumentException.

      Timestamp.from(Instant.MAX)
      gives 169108098-07-04 06:51:43.0
      - should throw IllegalArgumentException.

      Javadoc is fine (IAE is documented).



      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      new Timestamp(Instant.MIN.toEpochMilli());
      new Timestamp(Instant.MAX.toEpochMilli());
      and so on...


            Assignee:
            Eamonn McManus
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: