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

ConcurrentModificationException thrown by AttachmentDeserializer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1.8, 2.2.5, 2.3
    • Core
    • None

    Description

      The follow stack (based on 2.2.x source) shows AttachmentDeserializer.cacheStreamedAttachments (1) is looping on the LazyAttachmentCollection.attachments List.

      for (Attachment a : attachments.getLoadedAttachments()) {
      ...
      }

      And, DelegatingInputStream.close() (2) triggers LazyAttachmentCollection.hasNext() (3) to insert new item to LazyAttachmentCollection.attachments List which causes ConcurrentModificationException

      Thread [main] (Suspended)
      (3) LazyAttachmentCollection.hasNext() line: 64
      AttachmentDeserializer.markClosed(DelegatingInputStream) line: 319
      (2) DelegatingInputStream.close() line: 47
      AttachmentDataSource.cache() line: 51
      (1) AttachmentDeserializer.cacheStreamedAttachments() line: 227
      AttachmentDeserializer.readNext() line: 192
      LazyAttachmentCollection.loadAll() line: 52
      LazyAttachmentCollection.size() line: 108

      Attachments

        1. CXF-2503.patch
          79 kB
          William Tam

        Activity

          People

            dkulp Daniel Kulp
            wtam William Tam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: