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

org.apache.cxf.endpoint.ClientImpl.invoke(BindingOperationInfo, Object[], Exchange) wastes cycles

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.2
    • 2.3.7, 2.4.3
    • None
    • None
    • Unknown

    Description

      While debugging our server, I saw in org.apache.cxf.endpoint.ClientImpl.invoke(BindingOperationInfo, Object[], Exchange):

      Map<String, Object> resp = new HashMap<String, Object>();
      resp.clear();
      

      That's silly and a noop. Attaching patch to remove and do:

      Map<String, Object> resp = new HashMap<String, Object>();
      

      If you want an empty map to avoid wasting space for a rarely used feature, perhaps use:

      Map<String, Object> resp = new HashMap<String, Object>(0);
      

      or:

      Map<String, Object> resp = new HashMap<String, Object>(1);
      

      Attachments

        1. ClientImpl.diff
          0.6 kB
          Gary D. Gregory

        Activity

          People

            dkulp Daniel Kulp
            ggregory Gary D. Gregory
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: