You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2006/08/03 23:54:40 UTC
svn commit: r428542 -
/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java
Author: agilliland
Date: Thu Aug 3 14:54:40 2006
New Revision: 428542
URL: http://svn.apache.org/viewvc?rev=428542&view=rev
Log:
gotta check for null, otherwise we can cause null pointers.
Modified:
incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java
Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java?rev=428542&r1=428541&r2=428542&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java Thu Aug 3 14:54:40 2006
@@ -152,6 +152,9 @@
* Format date using SimpleDateFormat format string.
*/
public static String formatDate(Date d, String fmt) {
+ if(d == null || fmt == null)
+ return fmt;
+
SimpleDateFormat format = new SimpleDateFormat(fmt);
return format.format(d);
}