[
https://issues.apache.org/jira/browse/SHINDIG-1527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul Lindner closed SHINDIG-1527.
---------------------------------
part of 2.5.0-beta1 release.
> It happens NPE when no json object
> ----------------------------------
>
> Key: SHINDIG-1527
> URL: https://issues.apache.org/jira/browse/SHINDIG-1527
> Project: Shindig
> Issue Type: Bug
> Components: Java
> Affects Versions: 2.0.2
> Environment: windows xp
> Reporter: Henry Kang
> Priority: Minor
> Fix For: 2.5.0-beta1
>
>
> BaseRequestItem.getTypesParameter() calls BeanJsonConverter.convertToObject().
> but if no exists json parameter, means getParameter(parameterName) returns
> null,
> it happens null point exception.
> and the method can't handled NPE. (it can control JSONException)
> public <T> T getTypedParameter(String parameterName, Class<T>
> dataTypeClass) {
> try {
> return converter.convertToObject(getParameter(parameterName),
> dataTypeClass);
> } catch (RuntimeException e) {
> if (e.getCause() instanceof JSONException)
> throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST,
> e.getMessage());
> throw e;
> }
> }
--
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