Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-5295

s:date ignores LocalTime

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.1.2
    • 6.2.0
    • Core Tags
    • None

    Description

      After upgrading from v5 to v6 I got an error with s:date not working with java.sql.Time. Since WW-5272 is not yet released, I thought I will convert java.sql.Time to LocalTime by simply changing the ognl expression in my s:date tags. 

      For example from 

      <s:date format="HH:mm" name="sqlTime"/>

      to

      <s:date format="HH:mm" name="sqlTime.toLocalTime()"/>

      This way there was no UnsupportedOperationException, but it turns out that nothing happens. In the class org.apache.struts2.components.Date there is no case for LocalTime and we end up with a log message LocalTime isn't supported!.

      There should be support for both java.sql.Time (as per WW-5272) and for LocalTime with similar behaviour.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nikos nikos dimitrakas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h