Author: vgritsenko
Date: Thu May  5 11:29:02 2005
New Revision: 168369

URL: http://svn.apache.org/viewcvs?rev=168369&view=rev
Log:
Call super.recycle last.
Call super.dispose.

Modified:
    
cocoon/blocks/unsupported/linkrewriter/trunk/java/org/apache/cocoon/transformation/LinkRewriterTransformer.java
    
cocoon/blocks/unsupported/linkrewriter/trunk/java/org/apache/cocoon/transformation/VariableRewriterTransformer.java

Modified: 
cocoon/blocks/unsupported/linkrewriter/trunk/java/org/apache/cocoon/transformation/LinkRewriterTransformer.java
URL: 
http://svn.apache.org/viewcvs/cocoon/blocks/unsupported/linkrewriter/trunk/java/org/apache/cocoon/transformation/LinkRewriterTransformer.java?rev=168369&r1=168368&r2=168369&view=diff
==============================================================================
--- 
cocoon/blocks/unsupported/linkrewriter/trunk/java/org/apache/cocoon/transformation/LinkRewriterTransformer.java
 (original)
+++ 
cocoon/blocks/unsupported/linkrewriter/trunk/java/org/apache/cocoon/transformation/LinkRewriterTransformer.java
 Thu May  5 11:29:02 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -171,9 +171,9 @@
  *   <dt>bad-link-str</dt>
  *   <dd>String to use for links with a correct InputModule prefix, but no 
value
  *   therein.  Defaults to the original URI.</dd>
- *   
+ *
  *   <dt>namespace-uri</dt>
- *   <dd>The namespace uri of elements whose attributes are considered for 
+ *   <dd>The namespace uri of elements whose attributes are considered for
  *   transformation. Defaults to the empty namespace ("").</dd>
  * </dl>
  *
@@ -216,10 +216,10 @@
  *
  * <p>
  *
- * @version CVS $Id: LinkRewriterTransformer.java,v 1.13 2004/05/26 11:23:47 
unico Exp $
+ * @version $Id$
  */
 public class LinkRewriterTransformer extends AbstractSAXTransformer
-implements Initializable, Disposable {
+                                     implements Initializable, Disposable {
 
     private final static String NAMESPACE = "";
 
@@ -360,10 +360,10 @@
                                                   this.origBadLinkStr); // 
else fall back to per-instance config
 
         this.namespaceURI = parameters.getParameter("namespace-uri", 
this.origNamespaceURI);
-        
+
         this.inSchemes = split(parameters.getParameter("schemes", 
this.origInSchemes), " ");
         this.outSchemes = split(parameters.getParameter("exclude-schemes", 
this.origOutSchemes), " ");
-        
+
         this.linkAttrs = this.origLinkAttrs;
         if (parameters.isParameter("link-attrs")) {
             try {
@@ -394,8 +394,6 @@
 
     /** Recycle this component for use in another map:transform. */
     public void recycle() {
-        super.recycle();
-
         // Note: configure() and initialize() are not called after every
         //       recycle, so don't null origConf, origLinkAttrs, etc.
         this.conf = null;
@@ -403,6 +401,8 @@
         this.linkAttrs = null;
         this.inSchemes = null;
         this.outSchemes = null;
+
+        super.recycle();
     }
 
     /**
@@ -605,5 +605,6 @@
             this.modHelper.releaseAll();
             this.modHelper = null;
         }
+        super.dispose();
     }
 }

Modified: 
cocoon/blocks/unsupported/linkrewriter/trunk/java/org/apache/cocoon/transformation/VariableRewriterTransformer.java
URL: 
http://svn.apache.org/viewcvs/cocoon/blocks/unsupported/linkrewriter/trunk/java/org/apache/cocoon/transformation/VariableRewriterTransformer.java?rev=168369&r1=168368&r2=168369&view=diff
==============================================================================
--- 
cocoon/blocks/unsupported/linkrewriter/trunk/java/org/apache/cocoon/transformation/VariableRewriterTransformer.java
 (original)
+++ 
cocoon/blocks/unsupported/linkrewriter/trunk/java/org/apache/cocoon/transformation/VariableRewriterTransformer.java
 Thu May  5 11:29:02 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -134,11 +134,10 @@
  * Note that currently, only links in the default ("") namespace are converted.
  *
  * @author <a href="mailto:[EMAIL PROTECTED]">Jeff Turner</a>
- * @version CVS $Id$
+ * @version $Id$
  */
-public class VariableRewriterTransformer
-    extends AbstractSAXTransformer implements Initializable, Disposable
-{
+public class VariableRewriterTransformer extends AbstractSAXTransformer
+                                         implements Initializable, Disposable {
 
     private static String NAMESPACE = "";
 
@@ -336,7 +335,6 @@
 
     /** Recycle this component for use in another map:transform. */
     public void recycle() {
-        super.recycle();
         this.resolver = null;
         this.linkAttrs = null;
         this.inSchemes = null;
@@ -344,15 +342,17 @@
         this.conf = null;
         // Note: configure() and initialize() are not called after every
         //recycle, so don't null origConf
+        super.recycle();
     }
 
     /* (non-Javadoc)
      * @see org.apache.avalon.framework.activity.Disposable#dispose()
      */
     public void dispose() {
-        if ( this.modHelper != null ) {
+        if (this.modHelper != null) {
             this.modHelper.releaseAll();
             this.modHelper = null;
         }
+        super.dispose();
     }
 }


Reply via email to