vincenzo    2003/06/25 03:33:43

  Modified:    src/java/org/apache/james/core Tag: branch_2_1_fcs
                        MailetConfigImpl.java
  Log:
  getInitAttribute(String) was throwing a RuntimeException if the attribute was 
missing (not defined in the <mailet> entry); now returns null.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3.4.5   +3 -9      
jakarta-james/src/java/org/apache/james/core/MailetConfigImpl.java
  
  Index: MailetConfigImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/core/MailetConfigImpl.java,v
  retrieving revision 1.3.4.4
  retrieving revision 1.3.4.5
  diff -u -r1.3.4.4 -r1.3.4.5
  --- MailetConfigImpl.java     24 Jun 2003 19:32:37 -0000      1.3.4.4
  +++ MailetConfigImpl.java     25 Jun 2003 10:33:43 -0000      1.3.4.5
  @@ -68,8 +68,7 @@
   /**
    * Implements the configuration object for a Mailet.
    *
  - * <P>CVS $Id$</P>
  - * @version 2.2.0
  + * @version CVS $Revision$ $Date$
    */
   public class MailetConfigImpl implements MailetConfig {
   
  @@ -158,15 +157,10 @@
        *
        * @param name the name of the attribute whose value is to be retrieved.
        *
  -     * @return the attribute value
  +     * @return the attribute value or null if missing
        */
       public String getInitAttribute(String name) {
  -        try {
  -            return configuration.getAttribute(name);
  -        } catch (ConfigurationException ce) {
  -            throw new RuntimeException("Embedded configuration exception was: " + 
ce.getMessage());
  -        }
  -
  +        return configuration.getAttribute(name, null);
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to