DateTimeConverter date format for converter exception args
----------------------------------------------------------

                 Key: MYFACES-1893
                 URL: https://issues.apache.org/jira/browse/MYFACES-1893
             Project: MyFaces Core
          Issue Type: Bug
          Components: General
    Affects Versions: 1.2.3, 1.2.2, 1.2.4-SNAPSHOT
         Environment: Windows XP, Pentium 4
            Reporter: Matthew Purland
             Fix For: 1.2.4-SNAPSHOT, 1.2.3


DateTimeConverter in getAsObject for
                                Object[] args = new 
Object[]{value,format.parse(new 
Date().toString()),_MessageUtils.getLabel(facesContext, uiComponent)};

throws ParseException Unparseable date: "Thu Jul 10 11:05:21 CDT 2008" 
The 

This is because format.parse(new Date().toString()) is an incorrect format for 
the DateFormat instance.  This is because there is no default SimpleDateFormat 
instance to format the pattern "Thu Jul 10 11:05:21 CDT 2008"

This should be changed to use the format method for formatting Date objects as 
documented in both Date and DateFormat javadoc.

Please change to:

format.format(new Date())

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to