Skip to content

Commit

Permalink
LPS-53005 Fixed NPE when null renderRequest is passed to getTemplateC…
Browse files Browse the repository at this point in the history
…ontent
  • Loading branch information
kgolebiowski committed Jan 23, 2015
1 parent 7d258b8 commit ee5da78
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -321,10 +321,10 @@ public String getTemplateContent(
recordSet.getName(themeDisplay.getLocale()));
contextObjects.put(TemplateConstants.TEMPLATE_ID, ddmTemplateId);

String viewMode = ParamUtil.getString(renderRequest, "viewMode");
String viewMode = Constants.VIEW;

if (Validator.isNull(viewMode)) {
viewMode = Constants.VIEW;
if(Validator.isNotNull(renderRequest)) {
viewMode = ParamUtil.getString(renderRequest, "viewMode", Constants.VIEW);
}

contextObjects.put("viewMode", viewMode);
Expand Down

0 comments on commit ee5da78

Please sign in to comment.