haul        2002/08/11 11:17:15

  Modified:    src/java/org/apache/cocoon/components/modules/input
                        DateInputModule.java
  Log:
  Fix when configuration is null
  
  Revision  Changes    Path
  1.3       +4 -4      
xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DateInputModule.java
  
  Index: DateInputModule.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DateInputModule.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DateInputModule.java      28 May 2002 13:41:28 -0000      1.2
  +++ DateInputModule.java      11 Aug 2002 18:17:15 -0000      1.3
  @@ -64,8 +64,8 @@
   import org.apache.avalon.framework.thread.ThreadSafe;
   
   /**
  - * DateInputModule returns current data as a string, optionally
  - * formated. Format given through attribute "format" of configuration
  + * DateInputModule returns current date, optionally formated as
  + * string. Format given through attribute "format" of configuration
    * root node.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Christian Haul</a>
  @@ -78,7 +78,7 @@
   
       public Object getAttribute( String name, Configuration modeConf, Map 
objectModel ) throws ConfigurationException {
           
  -        String format = modeConf.getAttribute("format",null);
  +        String format = (modeConf != null? modeConf.getAttribute("format",null) : 
null);
   
           if (format==null) {
               return new Date();
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to