Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-428

StringParameterInjector uses valueOf for Enums but JAXB creates fromValue

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.2.GA
    • Fix Version/s: 2.0.1.GA
    • Component/s: jaxrs
    • Labels:
      None
    • Estimated Difficulty:
      Low

      Description

      Enums generated by JAXB include a fromValue method that converts an incoming value into the relevant constant. RestEasy is currently not compatible with JAXB generated enums, as it uses the valueOf method instead (which requires a string value that exactly matches the constant name).

      Can a simple change be considerd (to org.jboss.resteasy.core.StringParameterUnmarshallerBinder) to support the JAXB generated fromValue method?

      I've noticed that this problem has been fixed in CXF:
      https://issues.apache.org/jira/browse/CXF-2390

      (http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java line 319)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bill.burke Bill Burke
                Reporter:
                joelittlejohn Joe Littlejohn
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: