incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r479865 - /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ChooseDateRenderer.java
Date Tue, 28 Nov 2006 02:58:23 GMT
Author: awiner
Date: Mon Nov 27 18:58:22 2006
New Revision: 479865

URL: http://svn.apache.org/viewvc?view=rev&rev=479865
Log:
Don't blow up when chooseDate gets passed a String for a Date that can't be parsed.  Just
log a warning

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ChooseDateRenderer.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ChooseDateRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ChooseDateRenderer.java?view=diff&rev=479865&r1=479864&r2=479865
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ChooseDateRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ChooseDateRenderer.java
Mon Nov 27 18:58:22 2006
@@ -1131,7 +1131,15 @@
         // sensitive manner.  That said, specifying the attributes in
         // Date or Number form is still preferred over String form.
         //
-        value = new Date((String)value);
+        try
+        {
+          value = new Date((String)value);
+        }
+        catch (Exception e)
+        {
+          _LOG.warning("Invalid string attribute for chooseDate: {0}",
+                       value);
+        }
       }
       else if (value instanceof Calendar)
       {



Mime
View raw message