You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2009/10/28 17:03:59 UTC

[jira] Resolved: (CXF-2503) ConcurrentModificationException thrown by AttachmentDeserializer

     [ https://issues.apache.org/jira/browse/CXF-2503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2503.
------------------------------

    Resolution: Fixed

> ConcurrentModificationException thrown by AttachmentDeserializer
> ----------------------------------------------------------------
>
>                 Key: CXF-2503
>                 URL: https://issues.apache.org/jira/browse/CXF-2503
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>            Reporter: William Tam
>            Assignee: Daniel Kulp
>             Fix For: 2.1.8, 2.2.5, 2.3
>
>         Attachments: CXF-2503.patch
>
>
> 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	

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.