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

InjectorUtils class goes to deep when it handles an enum value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.3.3
    • 2.4, 2.3.4
    • JAX-RS, Simple Frontend
    • None
    • 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

            sergey_beryozkin Sergey Beryozkin
            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