diff --git a/excel-importer/src/com/axonivy/util/excel/importer/wizard/ExcelImportProcessor.java b/excel-importer/src/com/axonivy/util/excel/importer/wizard/ExcelImportProcessor.java index 05ff0bf..747ff4d 100644 --- a/excel-importer/src/com/axonivy/util/excel/importer/wizard/ExcelImportProcessor.java +++ b/excel-importer/src/com/axonivy/util/excel/importer/wizard/ExcelImportProcessor.java @@ -41,11 +41,14 @@ import ch.ivyteam.ivy.scripting.dataclass.IEntityClass; import ch.ivyteam.ivy.scripting.dataclass.IProjectDataClassManager; import ch.ivyteam.ivy.search.restricted.ProjectRelationSearchScope; +import ch.ivyteam.log.Logger; import ch.ivyteam.util.io.resource.FileResource; import ch.ivyteam.util.io.resource.nio.NioFileSystemProvider; public class ExcelImportProcessor implements IWizardSupport, IRunnableWithProgress { + private static final Logger LOGGER = Logger.getLogger(ExcelImportProcessor.class); + private IIvyProject selectedSourceProject; private FileResource importFile; private IStatus status = Status.OK_STATUS; @@ -122,6 +125,7 @@ private void importExcel(IProjectDataClassManager manager, FileResource excel, I var entries = importData(sheet, newEntity, pmv); loaded = entries.size(); } catch (Exception ex) { + LOGGER.error("Excel data import failed", ex); status = EclipseUtil.createErrorStatus("Loading of Excel data failed", ex); } monitor.setTaskName("Loaded Excel rows into Database "+loaded); diff --git a/excel-importer/src/com/axonivy/util/excel/importer/wizard/ExcelImportWizardPage.java b/excel-importer/src/com/axonivy/util/excel/importer/wizard/ExcelImportWizardPage.java index d33d0cb..ad3d042 100644 --- a/excel-importer/src/com/axonivy/util/excel/importer/wizard/ExcelImportWizardPage.java +++ b/excel-importer/src/com/axonivy/util/excel/importer/wizard/ExcelImportWizardPage.java @@ -2,6 +2,7 @@ import java.io.File; import java.lang.reflect.InvocationTargetException; +import java.util.LinkedList; import java.util.List; import java.util.stream.Stream; @@ -90,7 +91,7 @@ protected void handleInputChanged() { } private void saveDialogSettings() { - List destinations = getImportHistory(); + List destinations = new LinkedList<>(getImportHistory()); String path = state.file.getSelection(); String lowerCasePath = path.toLowerCase(); if (destinations.contains(path)) {