You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Hugo Palma (JIRA)" <de...@tapestry.apache.org> on 2008/01/05 02:02:35 UTC

[jira] Created: (TAPESTRY-2020) java.lang properties should be coerced to null

java.lang properties should be coerced to null
----------------------------------------------

                 Key: TAPESTRY-2020
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2020
             Project: Tapestry
          Issue Type: Wish
          Components: tapestry-ioc
    Affects Versions: 5.0.7
            Reporter: Hugo Palma


Type coercion automatically coerces null objects of type like Integer and Double to 0. 
I don't think that in most cases this is the desired behaviour. null is definitely different from 0 so Tapestry is loosing information in the middle.

My suggestion is that the types in java.lang when null should be coerced to null. The collection type should be coerced to empty collections like they currently are.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2020) java.lang properties should be coerced to null

Posted by "Vjeran Marcinko (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556179#action_12556179 ] 

Vjeran Marcinko commented on TAPESTRY-2020:
-------------------------------------------

If anyone cares, I strongly agree on this. Null vale is totally meaningful value which means absence of some value. I use it constantly in my apps to test whether some optional property has been set or not. I don't see any reason why number properties would be treated differently. 

> java.lang properties should be coerced to null
> ----------------------------------------------
>
>                 Key: TAPESTRY-2020
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2020
>             Project: Tapestry
>          Issue Type: Wish
>          Components: tapestry-ioc
>    Affects Versions: 5.0.7
>            Reporter: Hugo Palma
>
> Type coercion automatically coerces null objects of type like Integer and Double to 0. 
> I don't think that in most cases this is the desired behaviour. null is definitely different from 0 so Tapestry is loosing information in the middle.
> My suggestion is that the types in java.lang when null should be coerced to null. The collection type should be coerced to empty collections like they currently are.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2020) java.lang properties should be coerced to null

Posted by "Hugo Palma (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558472#action_12558472 ] 

Hugo Palma commented on TAPESTRY-2020:
--------------------------------------

It would be great if this could be solved in time for 5.0.8.
This issue has turned out to be a real show stopper when implementing even the simplest forms.

> java.lang properties should be coerced to null
> ----------------------------------------------
>
>                 Key: TAPESTRY-2020
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2020
>             Project: Tapestry
>          Issue Type: Wish
>          Components: tapestry-ioc
>    Affects Versions: 5.0.7
>            Reporter: Hugo Palma
>
> Type coercion automatically coerces null objects of type like Integer and Double to 0. 
> I don't think that in most cases this is the desired behaviour. null is definitely different from 0 so Tapestry is loosing information in the middle.
> My suggestion is that the types in java.lang when null should be coerced to null. The collection type should be coerced to empty collections like they currently are.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2020) java.lang properties should be coerced to null

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556256#action_12556256 ] 

Howard M. Lewis Ship commented on TAPESTRY-2020:
------------------------------------------------

I may have to look into the type coercion code, since coercing to int.class should be 0 (or an error) whereas coercing to Integer.class should be null.  Handling nulls with form controls (both null -> string for the client, and string -> something for the submission) has proven to be tricky, and may involve new parameters on TextField & friends.

> java.lang properties should be coerced to null
> ----------------------------------------------
>
>                 Key: TAPESTRY-2020
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2020
>             Project: Tapestry
>          Issue Type: Wish
>          Components: tapestry-ioc
>    Affects Versions: 5.0.7
>            Reporter: Hugo Palma
>
> Type coercion automatically coerces null objects of type like Integer and Double to 0. 
> I don't think that in most cases this is the desired behaviour. null is definitely different from 0 so Tapestry is loosing information in the middle.
> My suggestion is that the types in java.lang when null should be coerced to null. The collection type should be coerced to empty collections like they currently are.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAPESTRY-2020) java.lang properties should be coerced to null

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-2020.
------------------------------------------

    Resolution: Duplicate
      Assignee: Howard M. Lewis Ship

Fixed as part of TAPESTRY-2056.

> java.lang properties should be coerced to null
> ----------------------------------------------
>
>                 Key: TAPESTRY-2020
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2020
>             Project: Tapestry
>          Issue Type: Wish
>          Components: tapestry-ioc
>    Affects Versions: 5.0.7
>            Reporter: Hugo Palma
>            Assignee: Howard M. Lewis Ship
>
> Type coercion automatically coerces null objects of type like Integer and Double to 0. 
> I don't think that in most cases this is the desired behaviour. null is definitely different from 0 so Tapestry is loosing information in the middle.
> My suggestion is that the types in java.lang when null should be coerced to null. The collection type should be coerced to empty collections like they currently are.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org