You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@apache.org on 2002/08/08 09:28:33 UTC

cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/impl XPathSourceInspector.java

stephan     2002/08/08 00:28:32

  Modified:    src/java/org/apache/cocoon/generation HTMLGenerator.java
               src/java/org/apache/cocoon/i18n XMLResourceBundle.java
               src/java/org/apache/cocoon/transformation
                        XIncludeTransformer.java
               src/scratchpad/src/org/apache/cocoon/components/source/impl
                        XPathSourceInspector.java
  Log:
  Test on Component since XPathProcessor IF doesn't implement Component anymore
  
  Revision  Changes    Path
  1.18      +4 -3      xml-cocoon2/src/java/org/apache/cocoon/generation/HTMLGenerator.java
  
  Index: HTMLGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/HTMLGenerator.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- HTMLGenerator.java	4 Jun 2002 11:22:59 -0000	1.17
  +++ HTMLGenerator.java	8 Aug 2002 07:28:32 -0000	1.18
  @@ -51,6 +51,7 @@
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.framework.activity.Disposable;
  +import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.parameters.Parameters;
  @@ -247,8 +248,8 @@
       }
   
       public void dispose() {
  -        if (this.manager != null) {
  -            this.manager.release(this.processor);
  +        if ((this.manager != null) && (this.processor instanceof Component)) {
  +            this.manager.release((Component)this.processor);
           }
           this.processor = null;
           super.dispose();
  
  
  
  1.10      +3 -2      xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java
  
  Index: XMLResourceBundle.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XMLResourceBundle.java	19 Jul 2002 13:09:31 -0000	1.9
  +++ XMLResourceBundle.java	8 Aug 2002 07:28:32 -0000	1.10
  @@ -122,7 +122,8 @@
   
       public void dispose()
       {
  -        this.manager.release(this.processor);
  +        if (this.processor instanceof Component)
  +            this.manager.release((Component)this.processor);  
           this.processor = null;
       }
   
  
  
  
  1.13      +3 -2      xml-cocoon2/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java
  
  Index: XIncludeTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XIncludeTransformer.java	13 Jun 2002 09:28:16 -0000	1.12
  +++ XIncludeTransformer.java	8 Aug 2002 07:28:32 -0000	1.13
  @@ -356,6 +356,7 @@
   
       public void dispose()
       {
  -        this.manager.release(this.processor);
  +        if (this.processor instanceof Component)
  +            this.manager.release((Component)this.processor);
       }
   }
  
  
  
  1.3       +4 -3      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/impl/XPathSourceInspector.java
  
  Index: XPathSourceInspector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/impl/XPathSourceInspector.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XPathSourceInspector.java	31 Jul 2002 13:13:32 -0000	1.2
  +++ XPathSourceInspector.java	8 Aug 2002 07:28:32 -0000	1.3
  @@ -59,6 +59,7 @@
   import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
   
   import org.apache.avalon.framework.activity.Startable;
  +import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
  @@ -148,8 +149,8 @@
                   } catch (ComponentException ce) {
                       this.getLogger().error("Could not retrieve component", ce);
                   } finally {
  -                    if (processor!=null)
  -                        this.manager.release(processor);
  +                    if ((processor!=null) && (processor instanceof Component))
  +                        this.manager.release((Component)processor);
                   }
               }
           } 
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org