java.sql.Date.valueOf(LocalDate) should throw when conversion is not possible

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 8u25
    • Component/s: core-libs
    • x86_64
    • linux_ubuntu

      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)


      A DESCRIPTION OF THE PROBLEM :
      Date.valueOf(LocalDate.MIN) and Date.valueOf(LocalDate.MAX)
      should throw an IllegalArgumentException

      Please fix javadoc too.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Date.from(LocalDate.MIN.atStartOfDay(ZoneId.systemDefault()).toInstant());
      and
      Date.from(LocalDate.MAX.atStartOfDay(ZoneId.systemDefault()).toInstant());
      throws.


            Assignee:
            Lance Andersen
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: