Skip to content

Commit

Permalink
Improved: Inline ‘EntityDataLoadContainer#getLoadFiles’
Browse files Browse the repository at this point in the history
(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 655f19c
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ private List<URL> prepareDataUrls(Delegator delegator, Delegator baseDelegator,
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);
Expand Down Expand Up @@ -493,13 +493,6 @@ private List<URL> prepareDataUrls(Delegator delegator, Delegator baseDelegator,
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" */
Expand Down

0 comments on commit 655f19c

Please sign in to comment.