Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8346247

DatePicker crashes when Focus changes and the entered date is invalid

XMLWordPrintable

    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      jdk-17.0.13.11
      Windows 11

      A DESCRIPTION OF THE PROBLEM :
      Consider a DatePicker with an invalid date. Now click somewhere else, i.e. make it lose focus. It crashes because the DatePicker.commitValue() doesn't properly validate the date, it simply parses it.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Consider a DatePicker with an invalid date. Now click somewhere else, i.e. make it lose focus. It crashes because the DatePicker.commitValue() doesn't properly validate the date, it simply parses it.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No crash. Old value should be kept in the field lastDate.
      ACTUAL -
      An Exception is thrown.

      CUSTOMER SUBMITTED WORKAROUND :
      There is no workaround.

      FREQUENCY : always


            adev Anupam Dev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: