You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Denis Stepanov (JIRA)" <ji...@apache.org> on 2011/08/24 12:33:29 UTC
[jira] [Created] (TAP5-1615) Add not null check expression syntax
Add not null check expression syntax
------------------------------------
Key: TAP5-1615
URL: https://issues.apache.org/jira/browse/TAP5-1615
Project: Tapestry 5
Issue Type: New Feature
Components: tapestry-core
Reporter: Denis Stepanov
Attachments: tapestry-notnull.patch
New sytax will allow to check if expression result is not null
value="prop?" - returns true if "prop" is not null
value="prop.a.b.c?" returns true if "c" is not null
value="prop?.a?.b?.c?" returns true if "c" is not null
value="m()?" returns true if result of the method "m" is not null
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1615) Add not null check expression syntax
Posted by "Josh Canfield (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Josh Canfield updated TAP5-1615:
--------------------------------
Priority: Minor (was: Major)
Minor loss of function, or other problem where easy workaround is present.
> Add not null check expression syntax
> ------------------------------------
>
> Key: TAP5-1615
> URL: https://issues.apache.org/jira/browse/TAP5-1615
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Reporter: Denis Stepanov
> Priority: Minor
> Attachments: tapestry-notnull.patch
>
>
> New sytax will allow to check if expression result is not null
> value="prop?" - returns true if "prop" is not null
> value="prop.a.b.c?" returns true if "c" is not null
> value="prop?.a?.b?.c?" returns true if "c" is not null
> value="m()?" returns true if result of the method "m" is not null
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1615) Add not null check expression syntax
Posted by "Josh Canfield (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090208#comment-13090208 ]
Josh Canfield commented on TAP5-1615:
-------------------------------------
Please provide a specific use case where this syntax provides some benefit.
> Add not null check expression syntax
> ------------------------------------
>
> Key: TAP5-1615
> URL: https://issues.apache.org/jira/browse/TAP5-1615
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Reporter: Denis Stepanov
> Attachments: tapestry-notnull.patch
>
>
> New sytax will allow to check if expression result is not null
> value="prop?" - returns true if "prop" is not null
> value="prop.a.b.c?" returns true if "c" is not null
> value="prop?.a?.b?.c?" returns true if "c" is not null
> value="m()?" returns true if result of the method "m" is not null
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1615) Add not null check expression syntax
Posted by "Josh Canfield (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090208#comment-13090208 ]
Josh Canfield commented on TAP5-1615:
-------------------------------------
Please provide a specific use case where this syntax provides some benefit.
> Add not null check expression syntax
> ------------------------------------
>
> Key: TAP5-1615
> URL: https://issues.apache.org/jira/browse/TAP5-1615
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Reporter: Denis Stepanov
> Attachments: tapestry-notnull.patch
>
>
> New sytax will allow to check if expression result is not null
> value="prop?" - returns true if "prop" is not null
> value="prop.a.b.c?" returns true if "c" is not null
> value="prop?.a?.b?.c?" returns true if "c" is not null
> value="m()?" returns true if result of the method "m" is not null
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1615) Add not null check expression syntax
Posted by "Denis Stepanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denis Stepanov updated TAP5-1615:
---------------------------------
Attachment: tapestry-notnull.patch
SVN patch with tests
> Add not null check expression syntax
> ------------------------------------
>
> Key: TAP5-1615
> URL: https://issues.apache.org/jira/browse/TAP5-1615
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Reporter: Denis Stepanov
> Attachments: tapestry-notnull.patch
>
>
> New sytax will allow to check if expression result is not null
> value="prop?" - returns true if "prop" is not null
> value="prop.a.b.c?" returns true if "c" is not null
> value="prop?.a?.b?.c?" returns true if "c" is not null
> value="m()?" returns true if result of the method "m" is not null
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1615) Add not null check expression syntax
Posted by "Denis Stepanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090230#comment-13090230 ]
Denis Stepanov commented on TAP5-1615:
--------------------------------------
There is no workaround!
- null is converted to false
- unknown not null object is converted to a string by calling toString metod and then string is converted to a boolean
ToString method is usually implemented for debug purposes and can be slow.
Use case is implementing a logic related to a case when object is a null or not.
Please accept the patch.
> Add not null check expression syntax
> ------------------------------------
>
> Key: TAP5-1615
> URL: https://issues.apache.org/jira/browse/TAP5-1615
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Reporter: Denis Stepanov
> Priority: Minor
> Attachments: tapestry-notnull.patch
>
>
> New sytax will allow to check if expression result is not null
> value="prop?" - returns true if "prop" is not null
> value="prop.a.b.c?" returns true if "c" is not null
> value="prop?.a?.b?.c?" returns true if "c" is not null
> value="m()?" returns true if result of the method "m" is not null
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1615) Add not null check expression syntax
Posted by "Josh Canfield (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Josh Canfield updated TAP5-1615:
--------------------------------
Priority: Minor (was: Major)
Minor loss of function, or other problem where easy workaround is present.
> Add not null check expression syntax
> ------------------------------------
>
> Key: TAP5-1615
> URL: https://issues.apache.org/jira/browse/TAP5-1615
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Reporter: Denis Stepanov
> Priority: Minor
> Attachments: tapestry-notnull.patch
>
>
> New sytax will allow to check if expression result is not null
> value="prop?" - returns true if "prop" is not null
> value="prop.a.b.c?" returns true if "c" is not null
> value="prop?.a?.b?.c?" returns true if "c" is not null
> value="m()?" returns true if result of the method "m" is not null
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1615) Add not null check expression syntax
Posted by "Denis Stepanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denis Stepanov updated TAP5-1615:
---------------------------------
Attachment: tapestry-notnull.patch
SVN patch with tests
> Add not null check expression syntax
> ------------------------------------
>
> Key: TAP5-1615
> URL: https://issues.apache.org/jira/browse/TAP5-1615
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Reporter: Denis Stepanov
> Attachments: tapestry-notnull.patch
>
>
> New sytax will allow to check if expression result is not null
> value="prop?" - returns true if "prop" is not null
> value="prop.a.b.c?" returns true if "c" is not null
> value="prop?.a?.b?.c?" returns true if "c" is not null
> value="m()?" returns true if result of the method "m" is not null
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1615) Add not null check expression syntax
Posted by "Denis Stepanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090230#comment-13090230 ]
Denis Stepanov commented on TAP5-1615:
--------------------------------------
There is no workaround!
- null is converted to false
- unknown not null object is converted to a string by calling toString metod and then string is converted to a boolean
ToString method is usually implemented for debug purposes and can be slow.
Use case is implementing a logic related to a case when object is a null or not.
Please accept the patch.
> Add not null check expression syntax
> ------------------------------------
>
> Key: TAP5-1615
> URL: https://issues.apache.org/jira/browse/TAP5-1615
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Reporter: Denis Stepanov
> Priority: Minor
> Attachments: tapestry-notnull.patch
>
>
> New sytax will allow to check if expression result is not null
> value="prop?" - returns true if "prop" is not null
> value="prop.a.b.c?" returns true if "c" is not null
> value="prop?.a?.b?.c?" returns true if "c" is not null
> value="m()?" returns true if result of the method "m" is not null
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira