cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject cvs commit: cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor AbstractParentProcessingNode.java
Date Mon, 26 Jan 2004 15:44:59 GMT
unico       2004/01/26 07:44:59

  Modified:    src/java/org/apache/cocoon/components/cprocessor/sitemap
                        SelectNode.java
               src/java/org/apache/cocoon/components/cprocessor
                        AbstractParentProcessingNode.java
  Log:
  fix select node
  
  Revision  Changes    Path
  1.2       +5 -4      cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor/sitemap/SelectNode.java
  
  Index: SelectNode.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor/sitemap/SelectNode.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SelectNode.java	28 Dec 2003 21:03:17 -0000	1.1
  +++ SelectNode.java	26 Jan 2004 15:44:59 -0000	1.2
  @@ -54,6 +54,7 @@
   import java.util.List;
   import java.util.Map;
   
  +import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.parameters.Parameters;
  @@ -78,7 +79,7 @@
    * @x-avalon.lifestyle type=singleton
    * @x-avalon.info name=select-node
    */
  -public class SelectNode extends AbstractParentProcessingNode {
  +public class SelectNode extends AbstractParentProcessingNode implements Initializable {
       
       private String m_type;
       private VariableResolver[] m_tests;
  @@ -104,7 +105,7 @@
               String test = children[i].getAttribute("test");
               try {
                   tests.add(VariableResolverFactory.getResolver(test, super.m_manager));
  -                nodes.add(super.getChildNodesList(children[i]));
  +                nodes.add(super.getChildNodes(children[i]));
               }
               // TODO: better error reporting
               catch (PatternException e) {
  @@ -112,7 +113,7 @@
               }
           }
           m_tests = (VariableResolver[]) tests.toArray(new VariableResolver[tests.size()]);
  -        m_whenNodes = (ProcessingNode[][])nodes.toArray(new ProcessingNode[tests.size()][0]);
  +        m_whenNodes = (ProcessingNode[][]) nodes.toArray(new ProcessingNode[tests.size()][0]);
           
           // <otherwise> clause
           nodes = getChildNodesList(config.getChild("otherwise"));
  
  
  
  1.2       +6 -1      cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor/AbstractParentProcessingNode.java
  
  Index: AbstractParentProcessingNode.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor/AbstractParentProcessingNode.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractParentProcessingNode.java	28 Dec 2003 21:03:17 -0000	1.1
  +++ AbstractParentProcessingNode.java	26 Jan 2004 15:44:59 -0000	1.2
  @@ -146,6 +146,11 @@
           return result;
       }
       
  +    protected final ProcessingNode[] getChildNodes(Configuration config) throws ConfigurationException
{
  +        List children = getChildNodesList(config);
  +        return (ProcessingNode[]) children.toArray(new ProcessingNode[children.size()]);
  +    }
  +    
       /**
        * Check if the current config element is a parameter.
        * 
  
  
  

Mime
View raw message