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

InjectorUtils class goes to deep when it handles an enum value

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.3
    • Fix Version/s: 2.4, 2.3.4
    • Component/s: JAX-RS, Simple Frontend
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      class: org.apache.cxf.jaxrs.utils.InjectionUtils
      method: public static void fillInValuesFromBean(Object bean, String baseName, MultivaluedMap<String, Object> values){
      line number: 869

      Problem:
      If the Object "bean" is a enum value, one of the methods is called getDeclaringClass(). This should be catched on this line as it is done for getClass().
      getDeclaringClass() will never contain query-params.

      should be:
      if (baseName.contains(propertyName) || "class".equals(propertyName) || "declaringclass".equals(propertyName)) {
      continue;
      }

      This method is called by the ClientProxyImpl.handleQueries method.

        Attachments

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              brosnic Mike Moor
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified