Skip to content

Commit

Permalink
Improved: Rewrite ‘EntityDataLoadContainer#isDataReadersEnabled’
Browse files Browse the repository at this point in the history
(OFBIZ-11070)

Use a boolean expression instead of a conditional.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860837 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Jun 8, 2019
1 parent 0a465fa commit 8b2de5f
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -500,14 +500,10 @@ private List<String> getLoadFiles(String fileProp) {
return fileList;
}

private boolean isDataReadersEnabled(List<String> files, String directory, String readers) {
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" */
if (readers == null && (!files.isEmpty() || directory != null)) {
return false;
} else {
return true;
}
return readers != null || (files.isEmpty() && directory == null);
}

private List<String> prepareTenantLoadComponents(Delegator delegator, Delegator baseDelegator,
Expand Down

0 comments on commit 8b2de5f

Please sign in to comment.