svn commit: r1868029 - /ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1868029 - /ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java

mthl
Author: mthl
Date: Sat Oct  5 16:23:21 2019
New Revision: 1868029

URL: http://svn.apache.org/viewvc?rev=1868029&view=rev
Log:
Improved: Specify that the component dependencies are never ‘null’
(OFBIZ-11238)

Modified:
    ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java?rev=1868029&r1=1868028&r2=1868029&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java Sat Oct  5 16:23:21 2019
@@ -288,7 +288,7 @@ public final class ComponentConfig {
         this.enabled = b.enabled;
         this.resourceLoaderInfos = b.resourceLoaderInfos;
         this.classpathInfos = b.classpathInfos;
-        this.dependsOnInfos = b.dependsOnInfos;
+        this.dependsOnInfos = (b.dependsOnInfos == null) ? Collections.emptyList() : b.dependsOnInfos;
         this.entityResourceInfos = b.entityResourceInfos;
         this.serviceResourceInfos = b.serviceResourceInfos;
         this.testSuiteInfos = b.testSuiteInfos;
@@ -508,6 +508,11 @@ public final class ComponentConfig {
         return this.globalName;
     }
 
+    /**
+     * Provides the list of dependent components.
+     *
+     * @return an immutable list containing the dependency information.
+     */
     public List<DependsOnInfo> getDependsOn() {
         return this.dependsOnInfos;
     }