You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mt...@apache.org on 2019/10/19 14:56:50 UTC

svn commit: r1868630 - in /ofbiz/ofbiz-framework/trunk: build.gradle framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java

Author: mthl
Date: Sat Oct 19 14:56:50 2019
New Revision: 1868630

URL: http://svn.apache.org/viewvc?rev=1868630&view=rev
Log:
Improved: Adapt ‘ContainerConfig#getConfigurations’
(OFBIZ-11256)

Remove unused declared ‘ContainerException’ in signature and fix the
javadoc to match the actual specification.

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

Modified: ofbiz/ofbiz-framework/trunk/build.gradle
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/build.gradle?rev=1868630&r1=1868629&r2=1868630&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/build.gradle (original)
+++ ofbiz/ofbiz-framework/trunk/build.gradle Sat Oct 19 14:56:50 2019
@@ -308,7 +308,7 @@ checkstyle {
     // the sum of errors that were present before introducing the
     // ‘checkstyle’ tool present in the framework and in the official
     // plugins.
-    maxErrors = 37930
+    maxErrors = 37929
     // Currently there are a lot of errors so we need to temporarily
     // hide them to avoid polluting the terminal output.
     showViolations = false

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=1868630&r1=1868629&r2=1868630&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 19 14:56:50 2019
@@ -37,7 +37,6 @@ import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import org.apache.ofbiz.base.container.ContainerConfig;
-import org.apache.ofbiz.base.container.ContainerException;
 import org.apache.ofbiz.base.location.FlexibleLocation;
 import org.apache.ofbiz.base.util.Assert;
 import org.apache.ofbiz.base.util.Debug;
@@ -429,11 +428,7 @@ public final class ComponentConfig {
                 .collect(Collectors.collectingAndThen(
                         Collectors.toMap(rli -> rli.name, rli -> rli),
                         Collections::unmodifiableMap));
-        try {
-            configurations = ContainerConfig.getConfigurations(componentElement);
-        } catch (ContainerException ce) {
-            throw new ComponentException("Error reading container configurations for component: " + this.globalName, ce);
-        }
+        configurations = ContainerConfig.getConfigurations(componentElement);
         if (Debug.verboseOn()) {
             Debug.logVerbose("Read component config : [" + rootLocation + "]", module);
         }

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java?rev=1868630&r1=1868629&r2=1868630&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java Sat Oct 19 14:56:50 2019
@@ -72,13 +72,12 @@ public final class ContainerConfig {
     }
 
     /**
-     * Finds the container configuration elements in a XML file.
+     * Finds the {@code <container>} configuration elements in a XML element.
      *
-     * @param root  the URL of the XML file which cannot be {@code null}
+     * @param root  the XML element which cannot be {@code null}
      * @return a list of container configuration
-     * @throws ContainerException when failing to read the XML document.
      */
-    public static List<Configuration> getConfigurations(Element root) throws ContainerException {
+    public static List<Configuration> getConfigurations(Element root) {
         List<Configuration> res = UtilXml.childElementList(root, "container").stream()
                 .map(Configuration::new)
                 .collect(collectingAndThen(toList(), Collections::unmodifiableList));