Skip to content
Permalink
Browse files

Improved: Rewrite ‘EntityDataLoadContainer#isDataReadersEnabled’

(OFBIZ-11070)

Use a boolean expression instead of a conditional.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860062 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed May 26, 2019
1 parent 388f4c8 commit b71cd9891182c444d8f1621b09c43d432831a90c
@@ -500,14 +500,10 @@ private int getTransactionTimeout(String timeout) {
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,

0 comments on commit b71cd98

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