You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2004/03/15 09:23:32 UTC

DO NOT REPLY [Bug 27657] New: - [portal] IncludingHTMLSerializer throws ConcurrentModification

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27657>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27657

[portal] IncludingHTMLSerializer throws ConcurrentModification

           Summary: [portal] IncludingHTMLSerializer throws
                    ConcurrentModification
           Product: Cocoon 2
           Version: Current CVS 2.1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: blocks
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: durdina@asset.sk


There is one serious problem with IncludingHTMLSerializer when serializing 2 
and more portlets whose are interleaved with bigger amount of HTML markup. 
Serialization is carried out in blocks of 8Kb and ReplacingOutputStream.write 
is called after every block is ready. The portlet iterator created from the 
orderedPortletList on the first call of writeNext() is later broken by 
following calls of orderedPortletList.add() when more portlets are being added 
to the orderedPortletList at startElement(). As a result the 
java.util.ConcurrentModification exception occurs on the next call of 
valueIterator.next(). 

I propose to implement queue and use LinkedList.addFirst() and 
LinkedList.removeLast() methods instead of ArrayList.iterator(). The linked 
list should also be thread specific variable because it contains portlet 
outputs specific only to the current thread.