Details
Description
If the CSV file contains blank rows/columns, the import fails with the following exception:
Cause :
java.lang.IllegalArgumentException: username argument cannot be null or blankStack Trace :
java.lang.IllegalArgumentException: username argument cannot be null or blank
at org.apache.commons.lang.Validate.isTrue(Validate.java:157)
at com.atlassian.crowd.integration.model.user.UserTemplate.<init>(UserTemplate.java:35)
at com.atlassian.crowd.integration.model.user.UserTemplateWithAttributes.<init>(UserTemplateWithAttributes.java:11)
at com.atlassian.crowd.integration.model.user.UserTemplateWithCredentialAndAttributes.<init>(UserTemplateWithCredentialAndAttributes.java:24)
at com.atlassian.crowd.importer.mappers.csv.UserMapper.mapRow(UserMapper.java:49)
at com.atlassian.crowd.importer.importers.CsvImporter.findUsers(CsvImporter.java:190)
at com.atlassian.crowd.importer.importers.BaseImporter.importUsersGroupsAndMemberships(BaseImporter.java:195)
at com.atlassian.crowd.importer.manager.ImporterManagerImpl.performImport(ImporterManagerImpl.java:35)
at com.atlassian.crowd.console.action.dataimport.CsvConfirmation.doExecute(CsvConfirmation.java:39)
It would be helpful to have the trailing blank rows/columns to be stripped off prior to importing the content or catching the exception and reporting a more meaningful error.