You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org> on 2009/02/24 18:56:01 UTC

[jira] Reopened: (TRINIDAD-1407) DateTimeConverter doesn't convert correctly as per the expectedDataType

     [ https://issues.apache.org/jira/browse/TRINIDAD-1407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeanne Waldman reopened TRINIDAD-1407:
--------------------------------------


I need to revert these changes temporarily since they are causing SRG test failures.

> DateTimeConverter doesn't convert correctly as per the expectedDataType
> -----------------------------------------------------------------------
>
>                 Key: TRINIDAD-1407
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1407
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions: 1.2.10-core
>            Reporter: Agam Dass
>            Assignee: Matthias Weßendorf
>            Priority: Blocker
>             Fix For:  1.2.12-core
>
>         Attachments: conversion.patch
>
>
> In the org.apache.myfaces.trinidadinternal.convert.DateTimeConverter#getAsObject() retrieves the date by parsing the String and then it calls  DateTimeConverter.__typeConvert() to convert this type to the expected type. But in the method __typeConvert() it gets the expectedType by calling the type instead of getting the expectedType(). 
> So it should be changed to expression.getExpectedType() instead of expression.getType()
> Class : org.apache.myfaces.trinidadinternal.convert.DateTimeConverter
> Method : 
>    static Object __typeConvert(FacesContext context, Converter converter, UIComponent component, 
>                                                       String strValue, Object value) 
> Line # 123
> Remove :     Class<?> expectedType = expression.getType(context.getELContext());
> Add         :     Class<?> expectedType = expression.getExpectedType(); 
> ===========================================================================
> This need to be fixed in Trinidad 1.2.10.1 and then forward-port to Trinidad 1.2.11.1. 

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