myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gcrawf...@apache.org
Subject svn commit: r749798 - /myfaces/trinidad/branches/1.2.11.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java
Date Tue, 03 Mar 2009 22:17:41 GMT
Author: gcrawford
Date: Tue Mar  3 22:17:41 2009
New Revision: 749798

URL: http://svn.apache.org/viewvc?rev=749798&view=rev
Log:
TRINIDAD-1407 DateTimeConverter doesn't convert correctly as per the expectedDataType

check for an expectedType of null as well as Object

Modified:
    myfaces/trinidad/branches/1.2.11.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java

Modified: myfaces/trinidad/branches/1.2.11.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java?rev=749798&r1=749797&r2=749798&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java
(original)
+++ myfaces/trinidad/branches/1.2.11.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java
Tue Mar  3 22:17:41 2009
@@ -120,14 +120,14 @@
     ValueExpression expression = component.getValueExpression("value");
     if (expression != null)
     {
-      Class<?> expectedType = expression.getExpectedType();  
-           
+      Class<?> expectedType = expression.getExpectedType();
+
       // If the expectedType is Object ask for the type which may be more specific
-      if(expectedType == Object.class) 
+      if(expectedType == null || expectedType == Object.class)
       {
         expectedType = expression.getType(context.getELContext());
-      } 
-        
+      }
+
 
       // Sometimes the type might be null, if it cannot be determined:
       if ((expectedType != null)



Mime
View raw message