Skip to content
Permalink
Browse files

Improved: Mark ‘ContainerConfig#configurations’ as final

(OFBIZ-11256)

Use uppercase to match coding standards.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868629 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Oct 19, 2019
1 parent 2c686c4 commit 29f814cd490ab03a9affd4a5f09c7ae099fca0e1
@@ -37,7 +37,7 @@
*/
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 static Configuration getConfiguration(String containerName, String config
* @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 static Configuration getConfiguration(String containerName) throws Contai
.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;
}

0 comments on commit 29f814c

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