Author: mthl
Date: Sun May 26 12:35:13 2019
New Revision: 1860063
URL:
http://svn.apache.org/viewvc?rev=1860063&view=revLog:
Improved: Inline ‘EntityDataLoadContainer#getLoadFiles’
(OFBIZ-11070)
Modified:
ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java
Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java?rev=1860063&r1=1860062&r2=1860063&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java Sun May 26 12:35:13 2019
@@ -459,7 +459,7 @@ public class EntityDataLoadContainer imp
List<URL> urlList = new ArrayList<>();
// prepare command line properties passed by user
- List<String> files = getLoadFiles(loadDataProps.get(DATA_FILE));
+ List<String> 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 imp
return urlList;
}
- private List<String> getLoadFiles(String fileProp) {
- List<String> fileList = new ArrayList<>();
- Optional.ofNullable(fileProp)
- .ifPresent(props -> fileList.addAll(StringUtil.split(props, ",")));
- return fileList;
- }
-
private static boolean isDataReadersEnabled(List<String> files, String directory, String readers) {
/* if files or directories are passed by the user and no readers are
* passed then set readers to "none" */