You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sc...@apache.org on 2005/08/30 16:17:40 UTC

svn commit: r264787 - /myfaces/api/trunk/src/java/javax/faces/convert/DateTimeConverter.java

Author: schof
Date: Tue Aug 30 07:17:36 2005
New Revision: 264787

URL: http://svn.apache.org/viewcvs?rev=264787&view=rev
Log:
Fixes MYFACES-459

Modified:
    myfaces/api/trunk/src/java/javax/faces/convert/DateTimeConverter.java

Modified: myfaces/api/trunk/src/java/javax/faces/convert/DateTimeConverter.java
URL: http://svn.apache.org/viewcvs/myfaces/api/trunk/src/java/javax/faces/convert/DateTimeConverter.java?rev=264787&r1=264786&r2=264787&view=diff
==============================================================================
--- myfaces/api/trunk/src/java/javax/faces/convert/DateTimeConverter.java (original)
+++ myfaces/api/trunk/src/java/javax/faces/convert/DateTimeConverter.java Tue Aug 30 07:17:36 2005
@@ -69,10 +69,9 @@
             if (value.length() > 0)
             {
                 DateFormat format = getDateFormat();
-                format.setLenient(true);
                 TimeZone tz = getTimeZone();
                 if( tz != null )
-                	format.setTimeZone( tz );
+                    format.setTimeZone( tz );
                 try
                 {
                     return format.parse(value);
@@ -143,6 +142,9 @@
         {
             throw new ConverterException("invalid type '" + _type + "'");
         }
+        
+        // format cannot be lenient (JSR-127)
+        format.setLenient(false);
         return format;
     }
 
@@ -243,7 +245,7 @@
 
     public TimeZone getTimeZone()
     {
-    	return _timeZone;
+        return _timeZone;
     }
 
     public void setTimeZone(TimeZone timeZone)