From 2f055ba36df4f6d2507203c02e36ccbcd7952ddb Mon Sep 17 00:00:00 2001 From: gexce Date: Mon, 25 Sep 2017 11:09:37 +0200 Subject: [PATCH] even harder --- .../src/com/bayer/edam/migration/EntryDownloader.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/AH MAM Migration/src/com/bayer/edam/migration/EntryDownloader.java b/AH MAM Migration/src/com/bayer/edam/migration/EntryDownloader.java index 5706047..71c8bb0 100644 --- a/AH MAM Migration/src/com/bayer/edam/migration/EntryDownloader.java +++ b/AH MAM Migration/src/com/bayer/edam/migration/EntryDownloader.java @@ -63,9 +63,10 @@ public class EntryDownloader implements CommandLineRunner { for (int i = 0; i < entrylist.entries.length; i++) { - File targetDir = new File("E:\\" + entrylist.entries[i].mediaAssistantId); + Integer entryId = Integer.parseInt(entrylist.entries[i].mediaAssistantId); + File targetDir = new File("E:\\" + entryId); if (targetDir.exists()) { - log.info("Skip " + entrylist.entries[i].mediaAssistantId + ", target directory already present"); + log.info("Skip " + entryId + ", target directory already present"); continue; } @@ -136,7 +137,7 @@ public class EntryDownloader implements CommandLineRunner { } } catch (HttpClientErrorException hcee) { - log.error(hcee.getMessage()); + log.error("ID " + entry.id + ": " + hcee.getMessage()); hcee.printStackTrace(); }