continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r351733 - in /maven/continuum/trunk/continuum-web/src/main: java/org/apache/maven/continuum/web/tool/DateTool.java resources/templates/screens/ProjectBuilds.vm
Date Fri, 02 Dec 2005 14:25:29 GMT
Author: evenisse
Date: Fri Dec  2 06:25:22 2005
New Revision: 351733

URL: http://svn.apache.org/viewcvs?rev=351733&view=rev
Log:
PR: CONTINUUM-496

Fix dates when they are null.

Modified:
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/DateTool.java
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectBuilds.vm

Modified: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/DateTool.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/DateTool.java?rev=351733&r1=351732&r2=351733&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/DateTool.java
(original)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/DateTool.java
Fri Dec  2 06:25:22 2005
@@ -461,6 +461,10 @@
     public String format(String format, Object obj, 
                          Locale locale, TimeZone timezone)
     {
+        if ( obj == null )
+        {
+            return null;
+        }
         Date date = toDate(obj);
         DateFormat df = getDateFormat(format, locale, timezone);
         if (date == null || df == null)

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectBuilds.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectBuilds.vm?rev=351733&r1=351732&r2=351733&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectBuilds.vm
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectBuilds.vm
Fri Dec  2 06:25:22 2005
@@ -33,8 +33,8 @@
       #foreach ( $build in $builds )
       <tr class="$css.nextClass">
         <td>#if ( $build.state == 2 ) $build.buildNumber #end</td>
-        <td>$date.format('medium',$build.startTime)</td>
-        <td>$date.format('medium',$build.endTime)</td>
+        <td>$!{date.format('medium',$build.startTime)}</td>
+        <td>$!{date.format('medium',$build.endTime)}</td>
         <td>$state.generate($build)</td>
         <td><a href="$link.setPage('ProjectBuild.vm').addQueryData('view','ProjectBuild').addQueryData('buildId',$build.id).addQueryData('id',$project.id)">Result</a></td>
       </tr>



Mime
View raw message