svn commit: r1868629 - /ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java

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

svn commit: r1868629 - /ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java

mthl
Author: mthl
Date: Sat Oct 19 14:29:26 2019
New Revision: 1868629

URL: http://svn.apache.org/viewvc?rev=1868629&view=rev
Log:
Improved: Mark ‘ContainerConfig#configurations’ as final
(OFBIZ-11256)

Use uppercase to match coding standards.

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

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=1868629&r1=1868628&r2=1868629&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:29:26 2019
@@ -37,7 +37,7 @@ import org.w3c.dom.Element;
  */
 public final class ContainerConfig {
     /** The global container configuration store. */
-    private static Map<String, Configuration> configurations = new LinkedHashMap<>();
+    private static final Map<String, Configuration> CONFIGURATIONS = new LinkedHashMap<>();
 
     private ContainerConfig() { }
 
@@ -64,7 +64,7 @@ public final class ContainerConfig {
      * @throws ContainerException when no configuration element are found.
      */
     public static Configuration getConfiguration(String containerName) throws ContainerException {
-        Configuration configuration = configurations.get(containerName);
+        Configuration configuration = CONFIGURATIONS.get(containerName);
         if (configuration == null) {
             throw new ContainerException("No container found with the name : " + containerName);
         }
@@ -83,7 +83,7 @@ public final class ContainerConfig {
                 .map(Configuration::new)
                 .collect(collectingAndThen(toList(), Collections::unmodifiableList));
         synchronized (ContainerConfig.class) {
-            res.forEach(cfg -> configurations.put(cfg.name(), cfg));
+            res.forEach(cfg -> CONFIGURATIONS.put(cfg.name(), cfg));
         }
         return res;
     }