Author: mthl
Date: Sun May 26 12:33:13 2019
New Revision: 1860062
URL:
http://svn.apache.org/viewvc?rev=1860062&view=revLog:
Improved: Rewrite ‘EntityDataLoadContainer#isDataReadersEnabled’
(OFBIZ-11070)
Use a boolean expression instead of a conditional.
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=1860062&r1=1860061&r2=1860062&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:33:13 2019
@@ -500,14 +500,10 @@ public class EntityDataLoadContainer imp
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,