vgritsenko    01/08/14 09:02:52

  Modified:    src/org/apache/cocoon/sitemap Tag: cocoon_20_branch
                        Handler.java
  Log:
  Restore environment state after processing
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.10  +7 -4      xml-cocoon2/src/org/apache/cocoon/sitemap/Handler.java
  
  Index: Handler.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/sitemap/Handler.java,v
  retrieving revision 1.9.2.9
  retrieving revision 1.9.2.10
  diff -u -r1.9.2.9 -r1.9.2.10
  --- Handler.java      2001/07/07 19:08:28     1.9.2.9
  +++ Handler.java      2001/08/14 16:02:52     1.9.2.10
  @@ -40,7 +40,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Carsten Ziegeler</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Giacomo Pati</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.9.2.9 $ $Date: 2001/07/07 19:08:28 $
  + * @version CVS $Revision: 1.9.2.10 $ $Date: 2001/08/14 16:02:52 $
    */
   public class Handler extends AbstractLoggable
   implements Runnable, Contextualizable, Composable, Processor, Disposable, 
SourceResolver {
  @@ -114,12 +114,13 @@
           if (this.sourceFileName.charAt(this.sourceFileName.length() - 1) == '/') {
               this.sourceFileName = this.sourceFileName + "sitemap.xmap";
           }
  +        SourceHandler oldSourceHandler = environment.getSourceHandler();
           try {
               environment.setSourceHandler(this.sourceHandler);
               this.source = environment.resolve(this.sourceFileName);
               this.contextSource = environment.resolve("");
           } finally {
  -            environment.setSourceHandler(null);
  +            environment.setSourceHandler(oldSourceHandler);
           }
           if (!this.isRegenerationRunning) {
               isRegenerationRunning = true;
  @@ -155,22 +156,24 @@
   
       public boolean process(Environment environment) throws Exception {
           checkSanity();
  +        SourceHandler oldSourceHandler = environment.getSourceHandler();
           try {
               environment.setSourceHandler(this.sourceHandler);
               return sitemap.process(environment);
           } finally {
  -            environment.setSourceHandler(null);
  +            environment.setSourceHandler(oldSourceHandler);
           }
       }
   
       public boolean process(Environment environment, StreamPipeline pipeline,
           EventPipeline eventPipeline) throws Exception {
           checkSanity();
  +        SourceHandler oldSourceHandler = environment.getSourceHandler();
           try {
               environment.setSourceHandler(this.sourceHandler);
               return sitemap.process(environment, pipeline, eventPipeline);
           } finally {
  -            environment.setSourceHandler(null);
  +            environment.setSourceHandler(oldSourceHandler);
           }
       }
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to