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

StringParameterInjector uses valueOf for Enums but JAXB creates fromValue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.1.GA
    • 1.2.GA
    • jaxrs
    • None
    • Low

      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)

              patriot1burke@gmail.com Bill Burke (Inactive)
              joelittlejohn Joe Littlejohn (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: