cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/source/impl SitemapSource.java
Date Wed, 08 Oct 2003 10:33:02 GMT
cziegeler    2003/10/08 03:33:02

  Modified:    src/java/org/apache/cocoon/components/source/impl
                        SitemapSource.java
  Log:
  Hopefully fixing internal environment handling. This should fix bug 22377.
  
  Revision  Changes    Path
  1.11      +7 -1      cocoon-2.1/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java
  
  Index: SitemapSource.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SitemapSource.java	16 Aug 2003 13:30:04 -0000	1.10
  +++ SitemapSource.java	8 Oct 2003 10:33:01 -0000	1.11
  @@ -304,13 +304,17 @@
           try {
               ByteArrayOutputStream os = new ByteArrayOutputStream();
               this.environment.setOutputStream(os);
  +            EnvironmentStack envStack = CocoonComponentManager.getCurrentEnvironmentStack();
  +            int currentOffset = envStack.getOffset();
               try {
                   CocoonComponentManager.enterEnvironment(this.environment,
                                                           this.manager,
                                                           this.pipelineProcessor);
  +                envStack.resetOffset(0);
                   this.processingPipeline.process(this.environment);
               } finally {
                   CocoonComponentManager.leaveEnvironment();
  +                envStack.resetOffset(currentOffset);
               }
               return new ByteArrayInputStream(os.toByteArray());
   
  @@ -394,6 +398,7 @@
                       CocoonComponentManager.enterEnvironment(this.environment,
                                                               this.manager,
                                                               this.pipelineProcessor);
  +                    envStack.resetOffset(0);
                       this.processingPipeline.prepareInternal(this.environment);
                       this.sourceValidity = this.processingPipeline.getValidityForEventPipeline();
                       final String eventPipelineKey = this.processingPipeline.getKeyForEventPipeline();
  @@ -464,6 +469,7 @@
                       CocoonComponentManager.enterEnvironment(this.environment,
                                                               this.manager,
                                                               this.pipelineProcessor);
  +                    envStack.resetOffset(0);
                       this.processingPipeline.process(this.environment, new EnvironmentChanger(consumer,
envStack));
                   } finally {
                       CocoonComponentManager.leaveEnvironment();
  
  
  

Mime
View raw message