filter out empty group names
@@ -79,10 +79,12 @@ public class DetectProjectService {
private void addUserGroupsToProject(final ProjectUsersService projectUsersService, final ProjectVersionWrapper projectVersionWrapper, final String[] groupsToAddToProject) throws IntegrationException {
for (final String userGroupName : groupsToAddToProject) {
+ if (StringUtils.isNotBlank(userGroupName)) {
logger.debug(String.format("Adding user group %s to project %s", userGroupName, projectVersionWrapper.getProjectView().getName()));
projectUsersService.addGroupToProject(projectVersionWrapper.getProjectView(), userGroupName);
}
}
+ }
public ProjectSyncModel createProjectSyncModel(final NameVersion projectNameVersion, final ProjectService projectService, final BlackDuckService hubService) throws DetectUserFriendlyException {
final ProjectSyncModel projectSyncModel = ProjectSyncModel.createWithDefaults(projectNameVersion.getName(), projectNameVersion.getVersion());
