You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Steven Dolg (JIRA)" <ji...@apache.org> on 2009/01/30 20:58:59 UTC

[jira] Assigned: (COCOON3-23) StackOverflowError on CachingPipeline.setup(OutputStream)

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

Steven Dolg reassigned COCOON3-23:
----------------------------------

    Assignee: Steven Dolg  (was: Cocoon Developers Team)

> StackOverflowError on CachingPipeline.setup(OutputStream)
> ---------------------------------------------------------
>
>                 Key: COCOON3-23
>                 URL: https://issues.apache.org/jira/browse/COCOON3-23
>             Project: Cocoon 3
>          Issue Type: Bug
>          Components: cocoon-pipeline
>    Affects Versions: 3.0.0-alpha-1
>            Reporter: Alexander Daniel
>            Assignee: Steven Dolg
>
> CachingPipeline.setup(OutputStream) calls itself resulting in a StackOverflowError [1]. I suppose that it should create a CachingOutputStream first and then call super.setup like setup(OutputStream outputStream, Map<String, Object> parameters) does [2]. [3] is a short code fragment to reproduce.
> [1] 
> @Override
> public void setup(OutputStream outputStream) {
>     this.setup(outputStream);
> }
> [2]
> @Override
> public void setup(OutputStream outputStream, Map<String, Object> parameters) {
>      // create a caching output stream to intercept the result
>      this.cachingOutputStream = new CachingOutputStream(outputStream);
>      super.setup(this.cachingOutputStream, parameters);
> }
> [3]
> Pipeline pipeline = new CachingPipeline();
> pipeline.addComponent(new StringGenerator("<x></x>"));
> pipeline.addComponent(new XMLSerializer());
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> pipeline.setup(baos);
> pipeline.execute();

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