cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/environment/wrapper MutableEnvironmentFacade.java
Date Wed, 01 Oct 2003 08:53:49 GMT
sylvain     2003/10/01 01:53:49

  Modified:    src/java/org/apache/cocoon/environment/wrapper
                        MutableEnvironmentFacade.java
  Log:
  Fix improper refresh of SitemapSource whith subsitemaps
  
  Revision  Changes    Path
  1.2       +13 -1     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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MutableEnvironmentFacade.java	16 Aug 2003 13:30:04 -0000	1.1
  +++ MutableEnvironmentFacade.java	1 Oct 2003 08:53:49 -0000	1.2
  @@ -79,6 +79,10 @@
   
       private EnvironmentWrapper env;
       
  +    // Track the first values set for prefix and uri
  +    private String prefix = null;
  +    private String uri = null;
  +    
       public MutableEnvironmentFacade(EnvironmentWrapper env) {
           this.env = env;
       }
  @@ -95,6 +99,13 @@
       // EnvironmentWrapper-specific method (SW:still have to understand why SitemapSource
needs them)
       public void setURI(String prefix, String uri) {
           this.env.setURI(prefix, uri);
  +        
  +        if (this.uri == null) {
  +            // First call : keep the values to restore them on the wrapped
  +            // enviromnent in reset()
  +            this.prefix = prefix;
  +            this.uri = uri;
  +        }
       }
   
       public void setOutputStream(OutputStream os) {
  @@ -112,6 +123,7 @@
       
       public void reset() {
           this.env.reset();
  +        this.env.setURI(this.uri, this.prefix);
       }
       //----------------------------------
   
  
  
  

Mime
View raw message