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

WrapperClassInInterceptor should check for null wrapperClass

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.3, 2.2.11
    • JAX-WS Runtime
    • None

    Description

      I'd suggest to add null pointer check.

      Index: rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
      ===================================================================
      --- rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java	(revision 34)
      +++ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java	(working copy)
      @@ -108,7 +108,7 @@
                   MessagePartInfo wrapperPart = wrappedMessageInfo.getMessagePart(0);
                   Class<?> wrapperClass = wrapperPart.getTypeClass();
                   Object wrappedObject = lst.get(wrapperPart.getIndex());
      -            if (!wrapperClass.isInstance(wrappedObject)) {
      +            if (wrapperClass != null && !wrapperClass.isInstance(wrappedObject)) {
                       wrappedObject = null;
                       wrapperPart = null;
                       wrapperClass = null;
      

      Attachments

        Activity

          People

            njiang Willem Jiang
            wtam William Tam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: