cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/transformation FragmentExtractorTransformer.java TraxTransformer.java WriteDOMSessionTransformer.java XIncludeTransformer.java XTTransformer.java
Date Fri, 01 Feb 2002 15:48:10 GMT
sylvain     02/02/01 07:48:10

  Modified:    src/java/org/apache/cocoon Cocoon.java
               src/java/org/apache/cocoon/acting
                        AbstractComplementaryConfigurableAction.java
               src/java/org/apache/cocoon/components/deli DeliImpl.java
               src/java/org/apache/cocoon/components/language/generator
                        GeneratorSelector.java
               src/java/org/apache/cocoon/components/language/markup/xsp
                        XSPFormValidatorHelper.java
               src/java/org/apache/cocoon/components/language/programming/java
                        JavaLanguage.java
               src/java/org/apache/cocoon/components/pipeline
                        CachingEventPipeline.java
               src/java/org/apache/cocoon/components/sax
                        XMLDeserializer.java XMLSerializer.java
               src/java/org/apache/cocoon/components/source
                        SourceHandlerImpl.java
               src/java/org/apache/cocoon/components/xscript
                        XScriptObjectFromURL.java
               src/java/org/apache/cocoon/components/xslt
                        XSLTProcessor.java XSLTProcessorImpl.java
               src/java/org/apache/cocoon/generation HTMLGenerator.java
                        ServerPagesGenerator.java StreamGenerator.java
               src/java/org/apache/cocoon/i18n XMLResourceBundle.java
               src/java/org/apache/cocoon/reading DatabaseReader.java
               src/java/org/apache/cocoon/sitemap AbstractSitemap.java
                        Handler.java
               src/java/org/apache/cocoon/transformation
                        FragmentExtractorTransformer.java
                        TraxTransformer.java
                        WriteDOMSessionTransformer.java
                        XIncludeTransformer.java XTTransformer.java
  Log:
  Code cleanup : remove unnecessary casts to Component and null-tests.
  
  Revision  Changes    Path
  1.6       +3 -3      xml-cocoon2/src/java/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Cocoon.java	22 Jan 2002 00:17:11 -0000	1.5
  +++ Cocoon.java	1 Feb 2002 15:48:08 -0000	1.6
  @@ -103,7 +103,7 @@
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
(Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:leo.sutic@inspireinfrastructure.com">Leo Sutic</a>
  - * @version CVS $Revision: 1.5 $ $Date: 2002/01/22 00:17:11 $
  + * @version CVS $Revision: 1.6 $ $Date: 2002/02/01 15:48:08 $
    */
   public class Cocoon
           extends AbstractLoggable
  @@ -691,8 +691,8 @@
               throw e;
           } finally {
               environment.setSourceHandler(oldSourceHandler);
  -            if (programGenerator != null) this.componentManager.release(programGenerator);
  -            if (sourceHandler != null) this.componentManager.release((Component) sourceHandler);
  +            this.componentManager.release(programGenerator);
  +            this.componentManager.release(sourceHandler);
           }
       }
   
  
  
  
  1.2       +2 -2      xml-cocoon2/src/java/org/apache/cocoon/acting/AbstractComplementaryConfigurableAction.java
  
  Index: AbstractComplementaryConfigurableAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/acting/AbstractComplementaryConfigurableAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractComplementaryConfigurableAction.java	3 Jan 2002 12:31:07 -0000	1.1
  +++ AbstractComplementaryConfigurableAction.java	1 Feb 2002 15:48:08 -0000	1.2
  @@ -28,7 +28,7 @@
    * effective.  The name of the root configuration element is irrelevant.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:07 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/01 15:48:08 $
    */
   public abstract class AbstractComplementaryConfigurableAction extends ConfigurableComposerAction
{
       private static Map configurations = new HashMap();
  @@ -103,7 +103,7 @@
                       throw new ConfigurationException("Error trying to load configurations
for resource: " + (resource == null ? "null" : resource.getSystemId()));
                   } finally {
                       if (resource != null) resource.recycle();
  -                    if (sourceHandler != null) this.manager.release((Component) sourceHandler);
  +                    this.manager.release(sourceHandler);
                   }
           } else {
           getLogger().debug("Using fixed cached configuration for " + descriptor);
  
  
  
  1.9       +2 -2      xml-cocoon2/src/java/org/apache/cocoon/components/deli/DeliImpl.java
  
  Index: DeliImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/deli/DeliImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DeliImpl.java	30 Jan 2002 17:13:24 -0000	1.8
  +++ DeliImpl.java	1 Feb 2002 15:48:08 -0000	1.9
  @@ -67,7 +67,7 @@
    * A Delivery Context Library for CC/PP and UAProf</a>.
    *
    * @author <a href="mailto:marbut@hplb.hpl.hp.com">Mark H. Butler</a>
  - * @version CVS $ $ $Date: 2002/01/30 17:13:24 $
  + * @version CVS $ $ $Date: 2002/02/01 15:48:08 $
    */
   
   public final class DeliImpl
  @@ -127,7 +127,7 @@
   
       /** Dispose of this class */
       public void dispose() {
  -        if (parser != null) this.manager.release((Component)parser);
  +        this.manager.release(parser);
           this.parser = null;
       }
   
  
  
  
  1.2       +2 -2      xml-cocoon2/src/java/org/apache/cocoon/components/language/generator/GeneratorSelector.java
  
  Index: GeneratorSelector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/generator/GeneratorSelector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GeneratorSelector.java	3 Jan 2002 12:31:09 -0000	1.1
  +++ GeneratorSelector.java	1 Feb 2002 15:48:08 -0000	1.2
  @@ -28,7 +28,7 @@
    * includes Sitemaps and XSP Pages
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:09 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/01 15:48:08 $
    */
   public class GeneratorSelector extends ExcaliburComponentSelector implements Disposable
{
   
  @@ -151,7 +151,7 @@
       }
   
       public void dispose() {
  -        this.manager.release((Component)this.classManager);
  +        this.manager.release(this.classManager);
   
           synchronized(this)
           {
  
  
  
  1.2       +2 -2      xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/XSPFormValidatorHelper.java
  
  Index: XSPFormValidatorHelper.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/XSPFormValidatorHelper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSPFormValidatorHelper.java	3 Jan 2002 12:31:10 -0000	1.1
  +++ XSPFormValidatorHelper.java	1 Feb 2002 15:48:09 -0000	1.2
  @@ -27,7 +27,7 @@
    * The <code>ValidatorActionResult</code> object helper
    *
    * @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:10 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/01 15:48:09 $
    */
   public class XSPFormValidatorHelper {
     /**
  @@ -478,7 +478,7 @@
                   throw new ConfigurationException("Error trying to load configurations for
resource: " + source.getSystemId());
               } finally {
                   if (source != null) source.recycle();
  -               if (sourceHandler != null) manager.release((Component) sourceHandler);
  +                manager.release(sourceHandler);
               }
           }
   
  
  
  
  1.2       +2 -2      xml-cocoon2/src/java/org/apache/cocoon/components/language/programming/java/JavaLanguage.java
  
  Index: JavaLanguage.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/programming/java/JavaLanguage.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaLanguage.java	3 Jan 2002 12:31:11 -0000	1.1
  +++ JavaLanguage.java	1 Feb 2002 15:48:09 -0000	1.2
  @@ -31,7 +31,7 @@
    * The Java programming language processor
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:11 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/01 15:48:09 $
    */
   public class JavaLanguage extends CompiledProgrammingLanguage implements ThreadSafe, Composable,
Disposable {
   
  @@ -314,6 +314,6 @@
      *  dispose
      */
     public void dispose() {
  -    manager.release((Component)this.classLoaderManager);
  +    manager.release(this.classLoaderManager);
     }
   }
  
  
  
  1.3       +4 -6      xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/CachingEventPipeline.java
  
  Index: CachingEventPipeline.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/CachingEventPipeline.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CachingEventPipeline.java	22 Jan 2002 00:17:11 -0000	1.2
  +++ CachingEventPipeline.java	1 Feb 2002 15:48:09 -0000	1.3
  @@ -41,7 +41,7 @@
    * does not cache! (If it would cache, the response would be cached twice!)
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/02/01 15:48:09 $
    */
   public class CachingEventPipeline
   extends AbstractEventPipeline
  @@ -183,8 +183,7 @@
                                     e
                               );
                           } finally {
  -                            if (deserializer != null)
  -                                this.manager.release((Component)deserializer);
  +                            this.manager.release(deserializer);
                           }
                       } else {
                           getLogger().debug("Cached content is invalid for '" + environment.getURI()
+ "'.");
  @@ -215,8 +214,7 @@
                   }
               }
           } finally {
  -            if (xmlSerializer != null)
  -                this.manager.release((Component)xmlSerializer);
  +            this.manager.release(xmlSerializer);
           }
           return true;
       }
  @@ -387,7 +385,7 @@
       }
   
       public void dispose() {
  -        this.manager.release((Component)this.eventCache);
  +        this.manager.release(this.eventCache);
           super.dispose();
       }
   }
  
  
  
  1.2       +3 -3      xml-cocoon2/src/java/org/apache/cocoon/components/sax/XMLDeserializer.java
  
  Index: XMLDeserializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/sax/XMLDeserializer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLDeserializer.java	3 Jan 2002 12:31:13 -0000	1.1
  +++ XMLDeserializer.java	1 Feb 2002 15:48:09 -0000	1.2
  @@ -7,6 +7,7 @@
    *****************************************************************************/
   package org.apache.cocoon.components.sax;
   
  +import org.apache.avalon.framework.component.Component;
   import org.apache.cocoon.xml.XMLProducer;
   import org.xml.sax.SAXException;
   
  @@ -22,10 +23,9 @@
    * the serialized data.
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:13 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/01 15:48:09 $
    */
  -public interface XMLDeserializer
  -extends XMLProducer {
  +public interface XMLDeserializer extends XMLProducer, Component {
   
       String ROLE = "org.apache.cocoon.components.sax.XMLDeserializer";
   
  
  
  
  1.2       +3 -2      xml-cocoon2/src/java/org/apache/cocoon/components/sax/XMLSerializer.java
  
  Index: XMLSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/sax/XMLSerializer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLSerializer.java	3 Jan 2002 12:31:13 -0000	1.1
  +++ XMLSerializer.java	1 Feb 2002 15:48:09 -0000	1.2
  @@ -7,6 +7,7 @@
    *****************************************************************************/
   package org.apache.cocoon.components.sax;
   
  +import org.apache.avalon.framework.component.Component;
   import org.apache.cocoon.xml.XMLConsumer;
   
   /**
  @@ -17,9 +18,9 @@
    * the serialized data.
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:13 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/01 15:48:09 $
    */
  -public interface XMLSerializer extends XMLConsumer {
  +public interface XMLSerializer extends XMLConsumer, Component {
   
       String ROLE = "org.apache.cocoon.components.sax.XMLSerializer";
       /**
  
  
  
  1.3       +3 -4      xml-cocoon2/src/java/org/apache/cocoon/components/source/SourceHandlerImpl.java
  
  Index: SourceHandlerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/SourceHandlerImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SourceHandlerImpl.java	22 Jan 2002 00:17:12 -0000	1.2
  +++ SourceHandlerImpl.java	1 Feb 2002 15:48:09 -0000	1.3
  @@ -36,7 +36,7 @@
   
   /**
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version $Id: SourceHandlerImpl.java,v 1.2 2002/01/22 00:17:12 vgritsenko Exp $
  + * @version $Id: SourceHandlerImpl.java,v 1.3 2002/02/01 15:48:09 sylvain Exp $
    */
   public final class SourceHandlerImpl
   extends AbstractLoggable
  @@ -109,9 +109,8 @@
        * Dispose
        */
       public void dispose() {
  -        if (this.urlFactory != null) {
  -            this.manager.release((Component)this.urlFactory);
  -        }
  +        this.manager.release(this.urlFactory);
  +
           Iterator iter = this.sourceFactories.values().iterator();
           SourceFactory current;
           while (iter.hasNext()) {
  
  
  
  1.2       +1 -1      xml-cocoon2/src/java/org/apache/cocoon/components/xscript/XScriptObjectFromURL.java
  
  Index: XScriptObjectFromURL.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xscript/XScriptObjectFromURL.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XScriptObjectFromURL.java	3 Jan 2002 12:31:15 -0000	1.1
  +++ XScriptObjectFromURL.java	1 Feb 2002 15:48:09 -0000	1.2
  @@ -58,7 +58,7 @@
         URLConnection conn = url.openConnection();
         InputStream is = conn.getInputStream();
         contentLength = conn.getContentLength();
  -      componentManager.release((Component)urlFactory);
  +      componentManager.release(urlFactory);
   
         return is;
       }
  
  
  
  1.3       +2 -1      xml-cocoon2/src/java/org/apache/cocoon/components/xslt/XSLTProcessor.java
  
  Index: XSLTProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xslt/XSLTProcessor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSLTProcessor.java	23 Jan 2002 00:29:16 -0000	1.2
  +++ XSLTProcessor.java	1 Feb 2002 15:48:09 -0000	1.3
  @@ -7,6 +7,7 @@
    *****************************************************************************/
   package org.apache.cocoon.components.xslt;
   
  +import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.Source;
  @@ -23,7 +24,7 @@
    * @version 1.0
    * @since   July 11, 2001
    */
  -public interface XSLTProcessor
  +public interface XSLTProcessor extends Component
   {
     /**
      * The role implemented by an <code>XSLTProcessor</code>.
  
  
  
  1.9       +1 -1      xml-cocoon2/src/java/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java
  
  Index: XSLTProcessorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XSLTProcessorImpl.java	26 Jan 2002 02:16:49 -0000	1.8
  +++ XSLTProcessorImpl.java	1 Feb 2002 15:48:09 -0000	1.9
  @@ -114,7 +114,7 @@
        */
       public void dispose() {
           if (this.manager != null) {
  -            this.manager.release((Component)store);
  +            this.manager.release(store);
           }
       }
   
  
  
  
  1.4       +2 -2      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HTMLGenerator.java	1 Feb 2002 14:19:53 -0000	1.3
  +++ HTMLGenerator.java	1 Feb 2002 15:48:09 -0000	1.4
  @@ -46,7 +46,7 @@
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a>
  - * @version CVS $Revision: 1.3 $ $Date: 2002/02/01 14:19:53 $
  + * @version CVS $Revision: 1.4 $ $Date: 2002/02/01 15:48:09 $
    */
   public class HTMLGenerator extends ComposerGenerator implements Cacheable, Recyclable,
Composable, Disposable {
   
  @@ -226,7 +226,7 @@
   
       public void dispose()
       {
  -        this.manager.release((Component)this.processor);
  +        this.manager.release(this.processor);
           super.dispose();
       }
   }
  
  
  
  1.6       +2 -3      xml-cocoon2/src/java/org/apache/cocoon/generation/ServerPagesGenerator.java
  
  Index: ServerPagesGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/ServerPagesGenerator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ServerPagesGenerator.java	29 Jan 2002 15:33:26 -0000	1.5
  +++ ServerPagesGenerator.java	1 Feb 2002 15:48:09 -0000	1.6
  @@ -59,7 +59,7 @@
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Revision: 1.5 $ $Date: 2002/01/29 15:33:26 $
  + * @version CVS $Revision: 1.6 $ $Date: 2002/02/01 15:48:09 $
    */
   public class ServerPagesGenerator extends ServletGenerator
     implements Recyclable, Disposable, Cacheable, Configurable
  @@ -270,8 +270,7 @@
        * dispose
        */
       public void dispose() {
  -        if(this.programGenerator != null)
  -            manager.release((Component)this.programGenerator);
  +        manager.release(this.programGenerator);
           this.programGenerator = null;
       }
   
  
  
  
  1.2       +2 -4      xml-cocoon2/src/java/org/apache/cocoon/generation/StreamGenerator.java
  
  Index: StreamGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/StreamGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StreamGenerator.java	3 Jan 2002 12:31:16 -0000	1.1
  +++ StreamGenerator.java	1 Feb 2002 15:48:09 -0000	1.2
  @@ -44,7 +44,7 @@
    * number of bytes read is equal to the getContentLength() value.
    *
    * @author <a href="mailto:Kinga_Dziembowski@hp.com">Kinga Dziembowski</a>
  - * @version $Revision: 1.1 $ $Date: 2002/01/03 12:31:16 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/01 15:48:09 $
    */
   public class StreamGenerator extends ComposerGenerator implements Poolable
   {
  @@ -122,9 +122,7 @@
               getLogger().error("Could not get parser", e);
               throw new ProcessingException("Exception in StreamGenerator.generate()", e);
           } finally {
  -            if (parser != null) {
  -                this.manager.release((Component)parser);
  -            }
  +            this.manager.release(parser);
           }
       }
   
  
  
  
  1.4       +2 -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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLResourceBundle.java	22 Jan 2002 00:17:13 -0000	1.3
  +++ XMLResourceBundle.java	1 Feb 2002 15:48:09 -0000	1.4
  @@ -32,7 +32,7 @@
    * @author <a href="mailto:mengelhart@earthtrip.com">Mike Engelhart</a>
    * @author <a href="mailto:neeme@one.lv">Neeme Praks</a>
    * @author <a href="mailto:oleg@one.lv">Oleg Podolsky</a>
  - * @version $Id: XMLResourceBundle.java,v 1.3 2002/01/22 00:17:13 vgritsenko Exp $
  + * @version $Id: XMLResourceBundle.java,v 1.4 2002/02/01 15:48:09 sylvain Exp $
    */
   public class XMLResourceBundle
       extends ResourceBundle
  @@ -80,7 +80,7 @@
   
       public void dispose()
       {
  -        this.manager.release((Component)this.processor);
  +        this.manager.release(this.processor);
           this.processor = null;
       }
   
  
  
  
  1.4       +1 -1      xml-cocoon2/src/java/org/apache/cocoon/reading/DatabaseReader.java
  
  Index: DatabaseReader.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/reading/DatabaseReader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DatabaseReader.java	22 Jan 2002 00:17:13 -0000	1.3
  +++ DatabaseReader.java	1 Feb 2002 15:48:09 -0000	1.4
  @@ -335,7 +335,7 @@
        */
       public void dispose()
       {
  -        if (this.dbselector != null) this.manager.release((Component)this.dbselector);
  +        this.manager.release(this.dbselector);
       }
   
       public String getMimeType() {
  
  
  
  1.6       +17 -26    xml-cocoon2/src/java/org/apache/cocoon/sitemap/AbstractSitemap.java
  
  Index: AbstractSitemap.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/sitemap/AbstractSitemap.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractSitemap.java	31 Jan 2002 16:53:11 -0000	1.5
  +++ AbstractSitemap.java	1 Feb 2002 15:48:09 -0000	1.6
  @@ -49,7 +49,7 @@
    * Base class for generated <code>Sitemap</code> classes
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.5 $ $Date: 2002/01/31 16:53:11 $
  + * @version CVS $Revision: 1.6 $ $Date: 2002/02/01 15:48:09 $
    */
   public abstract class AbstractSitemap extends AbstractLoggable implements Sitemap, Disposable,
ThreadSafe {
       private Context context;
  @@ -406,39 +406,30 @@
        * dispose
        */
       public void dispose() {
  -        if (this.urlFactory != null) {
  -            manager.release((Component)this.urlFactory);
  -        }
  -        if (this.generators != null) {
  -            manager.release((Component)this.generators);
  -        }
  -        if (this.transformers != null) {
  -            manager.release((Component)this.transformers);
  -        }
  -        if (this.serializers != null) {
  -            manager.release((Component)this.serializers);
  -        }
  -        if (this.readers != null) {
  -            manager.release((Component)this.readers);
  -        }
  -        if (this.actions != null) {
  -            manager.release((Component)this.actions);
  -        }
  -        if (this.matchers != null) {
  -            manager.release((Component)this.matchers);
  -        }
  -        if (this.selectors != null) {
  -            manager.release((Component)this.selectors);
  -        }
  -
  +        manager.release(this.urlFactory);
           this.urlFactory = null;
  +        
  +        manager.release(this.generators);
           this.generators = null;
  +        
  +        manager.release(this.transformers);
           this.transformers = null;
  +        
  +        manager.release(this.serializers);
           this.serializers = null;
  +        
  +        manager.release(this.readers);
           this.readers = null;
  +        
  +        manager.release(this.actions);
           this.actions = null;
  +        
  +        manager.release(this.matchers);
           this.matchers = null;
  +        
  +        manager.release(this.selectors);
           this.selectors = null;
  +
           manager = null;
       }
   
  
  
  
  1.6       +4 -5      xml-cocoon2/src/java/org/apache/cocoon/sitemap/Handler.java
  
  Index: Handler.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/sitemap/Handler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Handler.java	31 Jan 2002 16:53:11 -0000	1.5
  +++ Handler.java	1 Feb 2002 15:48:09 -0000	1.6
  @@ -42,7 +42,7 @@
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.5 $ $Date: 2002/01/31 16:53:11 $
  + * @version CVS $Revision: 1.6 $ $Date: 2002/02/01 15:48:09 $
    */
   public class Handler extends AbstractLoggable
   implements Runnable, Contextualizable, Composable, Processor, Disposable, SourceResolver
{
  @@ -278,10 +278,9 @@
               this.contextSource.recycle();
               this.contextSource = null;
           }
  -        if (this.sourceHandler != null) {
  -            manager.release((Component)this.sourceHandler);
  -            this.sourceHandler = null;
  -        }
  +        
  +        manager.release(this.sourceHandler);
  +        this.sourceHandler = null;
   
           this.basePath = null;
           this.sourceFileName = null;
  
  
  
  1.8       +2 -2      xml-cocoon2/src/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java
  
  Index: FragmentExtractorTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FragmentExtractorTransformer.java	1 Feb 2002 15:01:33 -0000	1.7
  +++ FragmentExtractorTransformer.java	1 Feb 2002 15:48:10 -0000	1.8
  @@ -56,7 +56,7 @@
    * and the associated generator are very likely to fail on a clustered server.</b>
    *
    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
  - * @version CVS $Revision: 1.7 $ $Date: 2002/02/01 15:01:33 $
  + * @version CVS $Revision: 1.8 $ $Date: 2002/02/01 15:48:10 $
    */
   public class FragmentExtractorTransformer extends AbstractTransformer
       implements Composable, Disposable, Cacheable, Poolable, Configurable {
  @@ -439,7 +439,7 @@
        * dispose
        */
       public void dispose() {
  -        if(this.documentFactory!=null) this.manager.release((Component) this.documentFactory);
  +        this.manager.release((Component)this.documentFactory);
           this.documentFactory = null;
   
           this.manager = null;
  
  
  
  1.9       +4 -7      xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java
  
  Index: TraxTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TraxTransformer.java	23 Jan 2002 18:47:43 -0000	1.8
  +++ TraxTransformer.java	1 Feb 2002 15:48:10 -0000	1.9
  @@ -114,7 +114,7 @@
    * @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
    * @author <a href="mailto:ovidiu@cup.hp.com">Ovidiu Predescu</a>
    * @author <a href="mailto:marbut@hplb.hpl.hp.com">Mark H. Butler</a>
  - * @version CVS $Id: TraxTransformer.java,v 1.8 2002/01/23 18:47:43 vgritsenko Exp $
  + * @version CVS $Id: TraxTransformer.java,v 1.9 2002/02/01 15:48:10 sylvain Exp $
    */
   public class TraxTransformer extends AbstractTransformer
   implements Transformer, Composable, Recyclable, Configurable, Cacheable, Disposable {
  @@ -505,12 +505,9 @@
   
       public void dispose()
       {
  -        if(this.browser != null)
  -            this.manager.release((Component)this.browser);
  -        if(this.xsltProcessor != null)
  -            this.manager.release((Component)this.xsltProcessor);
  -        if(this.deli != null)
  -            this.manager.release((Component)this.deli);
  +        this.manager.release(this.browser);
  +        this.manager.release(this.xsltProcessor);
  +        this.manager.release(this.deli);
       }
   
       public void recycle()
  
  
  
  1.3       +2 -4      xml-cocoon2/src/java/org/apache/cocoon/transformation/WriteDOMSessionTransformer.java
  
  Index: WriteDOMSessionTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/WriteDOMSessionTransformer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WriteDOMSessionTransformer.java	25 Jan 2002 03:58:30 -0000	1.2
  +++ WriteDOMSessionTransformer.java	1 Feb 2002 15:48:10 -0000	1.3
  @@ -45,7 +45,7 @@
    *   dom-root-element is the trigger that will be the root element of the DOM
    *
    * @author <a href="mailto:sven.beauprez@the-ecorp.com">Sven Beauprez</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/01/25 03:58:30 $ $Author: vgritsenko $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/02/01 15:48:10 $ $Author: sylvain $
    */
   
   public class WriteDOMSessionTransformer extends AbstractTransformer implements 
  @@ -103,9 +103,7 @@
       }
       
       public void dispose() {
  -        if (this.parser != null)  {
  -            this.manager.release((Component)this.parser);
  -        }
  +        this.manager.release(this.parser);
       }
   
   
  
  
  
  1.4       +2 -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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XIncludeTransformer.java	25 Jan 2002 03:58:30 -0000	1.3
  +++ XIncludeTransformer.java	1 Feb 2002 15:48:10 -0000	1.4
  @@ -41,7 +41,7 @@
    * by the SAX event FSM yet.
    *
    * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a>
  - * @version CVS $Revision: 1.3 $ $Date: 2002/01/25 03:58:30 $ $Author: vgritsenko $
  + * @version CVS $Revision: 1.4 $ $Date: 2002/02/01 15:48:10 $ $Author: sylvain $
    */
   public class XIncludeTransformer extends AbstractTransformer implements Composable, Recyclable,
Disposable {
   
  @@ -311,6 +311,6 @@
   
       public void dispose()
       {
  -        this.manager.release((Component)this.processor);
  +        this.manager.release(this.processor);
       }
   }
  
  
  
  1.3       +3 -4      xml-cocoon2/src/java/org/apache/cocoon/transformation/XTTransformer.java
  
  Index: XTTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/XTTransformer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XTTransformer.java	25 Jan 2002 13:27:48 -0000	1.2
  +++ XTTransformer.java	1 Feb 2002 15:48:10 -0000	1.3
  @@ -49,7 +49,7 @@
    * This Transformer use the XT processor.
    *
    * @author <a href="mailto:ssahuc@imediation.com">Sahuc Sebastien</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/01/25 13:27:48 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/02/01 15:48:10 $
    */
   public class XTTransformer extends DocumentHandlerWrapper
   implements Transformer, Composable, Loggable, Recyclable, Disposable {
  @@ -263,8 +263,7 @@
       */
       public void dispose()
       {
  -        if(this.store != null)
  -            this.manager.release((Component)this.store);
  +        this.manager.release(this.store);
       }
   }
   
  @@ -340,7 +339,7 @@
               log.error("cannot obtain the URLFactory", e);
               throw new SAXException ("cannot obtain the URLFactory", e);
           } finally {
  -            if(urlFactory != null) this.manager.release((Component)urlFactory);
  +            this.manager.release(urlFactory);
           }
           this.xslFile = new File(url.getFile());
           lastModified = xslFile.lastModified();
  
  
  

----------------------------------------------------------------------
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


Mime
View raw message