cziegeler    2003/10/25 10:51:29

  Modified:    src/java/org/apache/cocoon/environment/wrapper
                        MutableEnvironmentFacade.java
  Log:
  This fixes the NPE recently found in the chaperon examples.
  The problem is that after a getInputStream/toSAX to a SitemapSource,
  this method couldn't be called a second time. 
  Uncommenting this line from the reset() method solves *this* problem,
  but does it create new ones?
  (I'm really glad that we can trash all this in 2.2)
  
  Revision  Changes    Path
  1.3       +6 -2      
cocoon-2.1/src/java/org/apache/cocoon/environment/wrapper/MutableEnvironmentFacade.java
  
  Index: MutableEnvironmentFacade.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/wrapper/MutableEnvironmentFacade.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MutableEnvironmentFacade.java     1 Oct 2003 08:53:49 -0000       1.2
  +++ MutableEnvironmentFacade.java     25 Oct 2003 17:51:29 -0000      1.3
  @@ -123,7 +123,11 @@
       
       public void reset() {
           this.env.reset();
  -        this.env.setURI(this.uri, this.prefix);
  +        // TODO - If we remove the line below, do we break something
  +        //        else again? If we leave it in, the SitemapSource
  +        //        object is unusable after a call to getInputStream()
  +        //        or toSAX() :(
  +        //this.env.setURI(this.uri, this.prefix);
       }
       //----------------------------------
   
  
  
  

Reply via email to