cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r190716 - /cocoon/blocks/template/trunk/java/org/apache/cocoon/template/instruction/FormatDate.java
Date Wed, 15 Jun 2005 07:45:08 GMT
Author: sylvain
Date: Wed Jun 15 00:45:05 2005
New Revision: 190716

URL: http://svn.apache.org/viewcvs?rev=190716&view=rev
Log:
Most attributes of jx:formatDate are optional

Modified:
    cocoon/blocks/template/trunk/java/org/apache/cocoon/template/instruction/FormatDate.java

Modified: cocoon/blocks/template/trunk/java/org/apache/cocoon/template/instruction/FormatDate.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/template/trunk/java/org/apache/cocoon/template/instruction/FormatDate.java?rev=190716&r1=190715&r2=190716&view=diff
==============================================================================
--- cocoon/blocks/template/trunk/java/org/apache/cocoon/template/instruction/FormatDate.java
(original)
+++ cocoon/blocks/template/trunk/java/org/apache/cocoon/template/instruction/FormatDate.java
Wed Jun 15 00:45:05 2005
@@ -86,15 +86,15 @@
     }
 
     private String format(ExpressionContext expressionContext) throws Exception {
-        String var = this.var.getStringValue(expressionContext);
-        Object value = this.value.getValue(expressionContext);
-        Object locVal = this.locale.getValue(expressionContext);
-        String pattern = this.pattern.getStringValue(expressionContext);
-        Object timeZone = this.timeZone.getValue(expressionContext);
+        String var = this.var == null ? null : this.var.getStringValue(expressionContext);
+        Object value = this.value == null ? null : this.value.getValue(expressionContext);
+        Object locVal = this.locale == null ? null : this.locale.getValue(expressionContext);
+        String pattern = this.pattern == null ? null : this.pattern.getStringValue(expressionContext);
+        Object timeZone = this.timeZone == null ? null : this.timeZone.getValue(expressionContext);
 
-        String type = this.type.getStringValue(expressionContext);
-        String timeStyle = this.timeStyle.getStringValue(expressionContext);
-        String dateStyle = this.dateStyle.getStringValue(expressionContext);
+        String type = this.type == null ? null : this.type.getStringValue(expressionContext);
+        String timeStyle = this.timeStyle == null ? null : this.timeStyle.getStringValue(expressionContext);
+        String dateStyle = this.dateStyle == null ? null : this.dateStyle.getStringValue(expressionContext);
 
         String formatted = null;
 



Mime
View raw message