From 655f19c2faaff3bbf81bb87d7e191f2adf643d08 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sun, 26 May 2019 12:35:13 +0000 Subject: [PATCH] =?UTF-8?q?Improved:=20Inline=20=E2=80=98EntityDataLoadCon?= =?UTF-8?q?tainer#getLoadFiles=E2=80=99=20(OFBIZ-11070)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860063 13f79535-47bb-0310-9956-ffa450edef68 --- .../ofbiz/entityext/data/EntityDataLoadContainer.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java b/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java index a13a069f2c..874028669f 100644 --- a/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java +++ b/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java @@ -459,7 +459,7 @@ public class EntityDataLoadContainer implements Container { List urlList = new ArrayList<>(); // prepare command line properties passed by user - List files = getLoadFiles(loadDataProps.get(DATA_FILE)); + List files = Arrays.asList(loadDataProps.getOrDefault(DATA_FILE, "").split(",")); String directory = loadDataProps.get(DATA_DIR); String component = loadDataProps.get(DATA_COMPONENT); String readers = loadDataProps.get(DATA_READERS); @@ -493,13 +493,6 @@ public class EntityDataLoadContainer implements Container { return urlList; } - private List getLoadFiles(String fileProp) { - List fileList = new ArrayList<>(); - Optional.ofNullable(fileProp) - .ifPresent(props -> fileList.addAll(StringUtil.split(props, ","))); - return fileList; - } - private static boolean isDataReadersEnabled(List files, String directory, String readers) { /* if files or directories are passed by the user and no readers are * passed then set readers to "none" */