You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org> on 2008/04/15 23:42:22 UTC
[jira] Updated: (TAPESTRY-2253) A brain dead implementation of
toString() on a custom data object can cause the Required validator to
throw a NullPointerExcepton
[ https://issues.apache.org/jira/browse/TAPESTRY-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAPESTRY-2253:
-------------------------------------------
Summary: A brain dead implementation of toString() on a custom data object can cause the Required validator to throw a NullPointerExcepton (was: Required Validator can produce NullPointerExceptions)
> A brain dead implementation of toString() on a custom data object can cause the Required validator to throw a NullPointerExcepton
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-2253
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2253
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.12
> Reporter: Kristian Marinkovic
> Assignee: Howard M. Lewis Ship
> Priority: Trivial
> Fix For: 5.0.12
>
>
> the validate method of the Required validator contains following code line:
> if (value == null || value.toString().equals(""))...
> if the toString method returns null an exception will occur (happened to me accidentally :))
> this code line should at least be changed to:
> if (value == null || "".equals(value.toString())... to prevent NPE
--
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