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

IndexOutOfBoundsException in MessageContentsList

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.1.1
    • Invalid
    • None
    • None

    Description

      In HolderInInterceptor, this part of code

      for (MessagePartInfo part : parts) {
      if (part.getIndex() != 0 && part.getTypeClass() != null)

      { Holder holder = (Holder)outHolders.get(part.getIndex() - 1); holder.value = inObjects.get(part); inObjects.put(part, holder); }

      }

      the code calls outHolders.get(part.getIndex() - 1), but when calling inObjects.get(part) on the next line it goes to this method in MessageContentsList :
      public Object get(MessagePartInfo key)

      { Object o = super.get(key.getIndex()); return o == REMOVED_MARKER ? null : o; }

      where it calls super.get(key.getIndex()),so when the index is 8 in a list of size 8, I get this exception. (note the -1 at first, and nothing in the latter method, although both are of type list)
      Previously when I configured the bus & client in java I hadn't this problem, but now I'm doing it through Spring xml files and I guess I've left something out.

      Attached is a testcase with the working and not working scenario. The library files and versions used are in the build.xml file

      Attachments

        1. testcase.zip
          11 kB
          Iman Rahmatizadeh

        Activity

          People

            dkulp Daniel Kulp
            imanrahmati Iman Rahmatizadeh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: