Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7442

Improve handling of JSR 310 Date Time API

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.12
    • 3.2.0
    • JAX-RS
    • None
    • Unknown

    Description

      If a wrong date is given as param, the type is a JSR 310 Datatype and an XmlAdapter is used, it will result in a ClassCastException. Moreover the catch block in org.apache.cxf.jaxrs.utils.JAXBUtils.useAdapter logs using ex.printStackTrace(). I created a testcase in org.apache.cxf.jaxrs.utils.InjectionUtilsTest#testJsr310DateExceptionHandling.

      In my view it should end up in IllegalArgumentException/ createParamConversionException as for other invalid params.

      General question: Since CXF 3.2 depends on Java 8 do we want to make JSR 310 handling more convenient so that XmlAdapter stuff is no longer required?

      Attachments

        Activity

          People

            deki Dennis Kieselhorst
            deki Dennis Kieselhorst
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: