You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Howard M. Lewis Ship (Assigned) (JIRA)" <ji...@apache.org> on 2012/03/21 21:02:40 UTC

[jira] [Assigned] (TAP5-1881) TypeCoercion from Number to Boolean fails every 256 times

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

Howard M. Lewis Ship reassigned TAP5-1881:
------------------------------------------

    Assignee: Howard M. Lewis Ship
    
> TypeCoercion from Number to Boolean fails every 256 times
> ---------------------------------------------------------
>
>                 Key: TAP5-1881
>                 URL: https://issues.apache.org/jira/browse/TAP5-1881
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.3.2
>            Reporter: Jerome Alberto
>            Assignee: Howard M. Lewis Ship
>              Labels: tapestry5
>
> At the moment the coercion from Number to Boolean is implemented as
> public Boolean coerce(Number input)
> {
>     return input.byteValue() != 0;
> }
> It should be
> public Boolean coerce(Number input)
> {
>     return input.longValue() != 0;
> }
> All numbers (e.g. longs, integers, shorts) will be coerced to false if the number modulo 256 is zero.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira