Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6625

potential NPE in CxfConsumer if the PAYLOAD not match the ServiceModel

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.10.7, 2.11.2, 2.12.0
    • camel-cxf
    • None
    • Unknown

    Description

      currently in CxfConsumer we have code like

                      BindingOperationInfo boi = cxfExchange.getBindingOperationInfo();
                      // make sure the "boi" is remained as wrapped in PAYLOAD mode
                      if (dataFormat == DataFormat.PAYLOAD && boi.isUnwrapped()) {
                          boi = boi.getWrappedOperation();
                          cxfExchange.put(BindingOperationInfo.class, boi);
                      }
      
      

      however, the boi could be NULL if the message PAYLOAD not match the ServiceModel, which means can't determine the operation from the PAYLOAD, should add a NPE guarder before boi.isUnwrapped to avoid the NPE

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            ffang Freeman Yue Fang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: