You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Andreas Andreou (JIRA)" <ta...@jakarta.apache.org> on 2006/08/14 07:46:14 UTC
[jira] Updated: (TAPESTRY-1059) JSONResponseBuilder parseParameters
method cause NPE.
[ http://issues.apache.org/jira/browse/TAPESTRY-1059?page=all ]
Andreas Andreou updated TAPESTRY-1059:
--------------------------------------
Component/s: Framework
Affects Version/s: 4.1.1
> JSONResponseBuilder parseParameters method cause NPE.
> -----------------------------------------------------
>
> Key: TAPESTRY-1059
> URL: http://issues.apache.org/jira/browse/TAPESTRY-1059
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.1.1
> Reporter: Jun Tsai
>
> /**
> * Grabs the incoming parameters needed for json responses, most notable the
> * {@link ServiceConstants#UPDATE_PARTS} parameter.
> *
> * @param cycle
> * The request cycle to parse from
> */
> protected void parseParameters(IRequestCycle cycle)
> {
> Object[] updateParts = cycle
> .getParameters(ServiceConstants.UPDATE_PARTS);
> for(int i = 0; i < updateParts.length; i++)
> _parts.add(updateParts[i].toString());
> }
> if my update components is empty or null. it will throw NPE.
> I think should be:
> Object[] updateParts = cycle
> .getParameters(ServiceConstants.UPDATE_PARTS);
> if(updateParts != null){
> for(int i = 0; i < updateParts.length; i++)
> _parts.add(updateParts[i].toString());
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org