You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by ha...@apache.org on 2002/08/11 20:17:15 UTC

cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/modules/input DateInputModule.java

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:haul@apache.org">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:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org