cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap ContinueNodeBuilder.java
Date Wed, 26 May 2004 01:56:28 GMT
joerg       2004/05/25 18:56:28

  Modified:    src/blocks/mail/java/org/apache/cocoon/mail
                        MailCommandBuilder.java
               src/java/org/apache/cocoon/components/treeprocessor/sitemap
                        ContinueNodeBuilder.java
  Log:
  no need for instanceof tests and casts as those classes already implement te according interfaces
  
  Revision  Changes    Path
  1.5       +3 -5      cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail/MailCommandBuilder.java
  
  Index: MailCommandBuilder.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail/MailCommandBuilder.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MailCommandBuilder.java	5 Mar 2004 13:02:00 -0000	1.4
  +++ MailCommandBuilder.java	26 May 2004 01:56:28 -0000	1.5
  @@ -17,9 +17,9 @@
   
   import java.util.HashMap;
   import java.util.Map;
  +
   import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.cocoon.mail.command.AbstractMailCommand;
   
   /**
  @@ -66,9 +66,7 @@
               if (clazz != null) {
                   ama = (AbstractMailCommand) clazz.newInstance();
                   // enable logging of the mail command
  -                if (ama instanceof LogEnabled) {
  -                    ((LogEnabled) ama).enableLogging(getLogger());
  -                }
  +                ama.enableLogging(getLogger());
                   // contextualize the mail command
                   if (ama instanceof Contextualizable) {
                       ((Contextualizable) ama).contextualize(mailContext);
  
  
  
  1.4       +3 -4      cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ContinueNodeBuilder.java
  
  Index: ContinueNodeBuilder.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ContinueNodeBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContinueNodeBuilder.java	5 Mar 2004 13:02:52 -0000	1.3
  +++ ContinueNodeBuilder.java	26 May 2004 01:56:28 -0000	1.4
  @@ -15,7 +15,6 @@
    */
   package org.apache.cocoon.components.treeprocessor.sitemap;
   
  -import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.cocoon.components.treeprocessor.AbstractProcessingNodeBuilder;
   import org.apache.cocoon.components.treeprocessor.ProcessingNode;
  @@ -39,8 +38,8 @@
   
       this.node = new ContinueNode(contId);
       this.treeBuilder.setupNode(this.node, config);
  -    if (node instanceof Configurable)
  -      ((Configurable)this.node).configure(config);
  +
  +    this.node.configure(config);
   
       return this.node;
     }
  
  
  

Mime
View raw message