Skip to content
Permalink
Browse files

Improved: Inline ‘EntityDataLoadContainer#getLoadFiles’

(OFBIZ-11070)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860063 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed May 26, 2019
1 parent b71cd98 commit 655f19c2faaff3bbf81bb87d7e191f2adf643d08
@@ -459,7 +459,7 @@ private int getTransactionTimeout(String timeout) {
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 @@ private int getTransactionTimeout(String timeout) {
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" */

0 comments on commit 655f19c

Please sign in to comment.
You can’t perform that action at this time.