cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lgaw...@apache.org
Subject svn commit: r581545 - in /cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables: StringTemplateParserVariableResolver.java VariableResolverFactory.java
Date Wed, 03 Oct 2007 09:49:27 GMT
Author: lgawron
Date: Wed Oct  3 02:49:27 2007
New Revision: 581545

URL: http://svn.apache.org/viewvc?rev=581545&view=rev
Log:
COCOON-2134,
StringTemplateParserVariableResolver does not need to implement Disposable

Modified:
    cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables/StringTemplateParserVariableResolver.java
    cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables/VariableResolverFactory.java

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables/StringTemplateParserVariableResolver.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables/StringTemplateParserVariableResolver.java?rev=581545&r1=581544&r2=581545&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables/StringTemplateParserVariableResolver.java
(original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables/StringTemplateParserVariableResolver.java
Wed Oct  3 02:49:27 2007
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,7 +18,6 @@
 
 import java.util.Map;
 
-import org.apache.avalon.framework.activity.Disposable;
 import org.apache.cocoon.components.treeprocessor.InvokeContext;
 import org.apache.cocoon.el.objectmodel.ObjectModel;
 import org.apache.cocoon.el.parsing.StringTemplateParser;
@@ -30,21 +29,20 @@
  *
  * @version $Id$
  */
-public final class StringTemplateParserVariableResolver extends VariableResolver
-                                                        implements Disposable {
-    
+public final class StringTemplateParserVariableResolver extends VariableResolver {
+
     public final static String ROLE = StringTemplateParserVariableResolver.class.getName();
-    
+
     private StringTemplateParser stringTemplateParser;
     private ObjectModel objectModel;
-    
+
     private Substitutions substitutions;
 
 
     public StringTemplateParserVariableResolver() {
         super();
     }
-    
+
     public StringTemplateParser getStringTemplateParser() {
         return stringTemplateParser;
     }
@@ -52,7 +50,7 @@
     public void setStringTemplateParser(StringTemplateParser stringTemplateParser) {
         this.stringTemplateParser = stringTemplateParser;
     }
-    
+
     public ObjectModel getObjectModel() {
         return objectModel;
     }
@@ -60,13 +58,13 @@
     public void setObjectModel(ObjectModel objectModel) {
         this.objectModel = objectModel;
     }
-    
+
     public void setExpression(String expression) throws PatternException {
         this.originalExpr = expression;
         try {
             if (stringTemplateParser instanceof LegacySitemapStringTemplateParser)
                 this.substitutions = new LegacySubstitutions((LegacySitemapStringTemplateParser)
stringTemplateParser, null, expression);
-            else 
+            else
                 this.substitutions = new Substitutions(stringTemplateParser, null, expression);
         } catch (Exception e) {
             throw new PatternException(e);
@@ -82,9 +80,5 @@
         } catch (Exception e) {
             throw new PatternException(e);
         }
-    }
-
-    public void dispose() {
-        //nothing to do
     }
 }

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables/VariableResolverFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables/VariableResolverFactory.java?rev=581545&r1=581544&r2=581545&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables/VariableResolverFactory.java
(original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/variables/VariableResolverFactory.java
Wed Oct  3 02:49:27 2007
@@ -110,13 +110,7 @@
                 throw new PatternException("Couldn't obtain VariableResolver.", e);
             }
 
-            List collector = (List) disposableCollector.get();
-            if (collector != null) {
-                collector.add(resolver);
-            }
-
             return resolver;
-
         }
 
         return new NOPVariableResolver(expression);



Mime
View raw message