diff options
Diffstat (limited to 'common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfigurationManager.java')
-rw-r--r-- | common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfigurationManager.java | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfigurationManager.java b/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfigurationManager.java index 640c95bf65..14a48d5a03 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfigurationManager.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfigurationManager.java @@ -16,7 +16,6 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.be.config; import java.io.IOException; @@ -30,6 +29,7 @@ import org.yaml.snakeyaml.Yaml; * Singleton that loads and stores the Non Mano configuration */ public class NonManoConfigurationManager { + private static NonManoConfigurationManager nonManoConfigurationManager = null; private NonManoConfiguration nonManoConfiguration; @@ -37,6 +37,13 @@ public class NonManoConfigurationManager { loadConfiguration(); } + public static NonManoConfigurationManager getInstance() { + if (nonManoConfigurationManager == null) { + nonManoConfigurationManager = new NonManoConfigurationManager(); + } + return nonManoConfigurationManager; + } + /** * Loads the configuration yaml from the resources. */ @@ -54,14 +61,6 @@ public class NonManoConfigurationManager { nonManoConfiguration = convertFromString(data, NonManoConfiguration.class); } - public static NonManoConfigurationManager getInstance() { - if (nonManoConfigurationManager == null) { - nonManoConfigurationManager = new NonManoConfigurationManager(); - } - - return nonManoConfigurationManager; - } - public NonManoConfiguration getNonManoConfiguration() { return nonManoConfiguration; } @@ -70,9 +69,7 @@ public class NonManoConfigurationManager { try { return (new Yaml()).loadAs(yamlContents, className); } catch (final Exception e) { - throw new - LoadConfigurationException(String.format("Failed to convert YAML %s to object.", yamlContents), e); + throw new LoadConfigurationException(String.format("Failed to convert YAML %s to object.", yamlContents), e); } } - } |