Details
-
Suggestion
-
Resolution: Fixed
Description
The code in question is the following in com.atlassian.jira.bc.project.projectoperation.DefaultProjectOperationManager:
for (Iterator iterator = projectOperationDescriptors.iterator(); iterator.hasNext();) { final ProjectOperationModuleDescriptor descriptor = (ProjectOperationModuleDescriptor) iterator.next(); final PluggableProjectOperation pluggableProjectOperation = (PluggableProjectOperation) descriptor.getModule(); // if a particular operation dies, we don't want it to take out _all_ operations try { if (pluggableProjectOperation != null && pluggableProjectOperation.showOperation(project, user)) { ret.add(pluggableProjectOperation); } } catch (Exception e) { log.error("Error loading project operation " + descriptor.getCompleteKey(), e); } }
if the descriptor.getModule() fails for any reason no pluggable project operation will be loaded. I suggest this code:
for (Iterator iterator = projectOperationDescriptors.iterator(); iterator.hasNext();) { final ProjectOperationModuleDescriptor descriptor = (ProjectOperationModuleDescriptor) iterator.next(); // if a particular operation dies, we don't want it to take out _all_ operations try { final PluggableProjectOperation pluggableProjectOperation = (PluggableProjectOperation) descriptor.getModule(); if (pluggableProjectOperation != null && pluggableProjectOperation.showOperation(project, user)) { ret.add(pluggableProjectOperation); } } catch (Exception e) { log.error("Error loading project operation " + descriptor.getCompleteKey(), e); } }