CS-17842: java.lang.NullPointerException seen when using

"updateTemplatePermission" with projectids parameter.
This commit is contained in:
Min Chen 2013-06-11 17:07:26 -07:00
parent 3bf15bd1ff
commit ec55c2e909
1 changed files with 4 additions and 0 deletions

View File

@ -1199,6 +1199,10 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
// convert projectIds to accountNames
if (projectIds != null) {
// CS-17842, initialize accountNames list
if (accountNames == null ){
accountNames = new ArrayList<String>();
}
for (Long projectId : projectIds) {
Project project = _projectMgr.getProject(projectId);
if (project == null) {