Skip to content

Commit

Permalink
Improved: Mark ‘ContainerConfig#configurations’ as final
Browse files Browse the repository at this point in the history
(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 29f814c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() { }

Expand All @@ -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);
}
Expand All @@ -83,7 +83,7 @@ public static List<Configuration> getConfigurations(Element root) throws Contain
.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;
}
Expand Down

0 comments on commit 29f814c

Please sign in to comment.