SDNC Adapter not loading properties 93/45493/2
authorRob Daugherty <rd472p@att.com>
Tue, 1 May 2018 19:48:21 +0000 (15:48 -0400)
committerRob Daugherty <rd472p@att.com>
Wed, 2 May 2018 00:52:13 +0000 (20:52 -0400)
Somebody changed some variables from static to non-static, and this
broke the CloudConfig loading logic.

I changed them back.

Change-Id: Id7dca76a4f0af0209ebd6cef8f3e0209c3f7a022
Issue-ID: SO-584
Signed-off-by: Rob Daugherty <rd472p@att.com>
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigFactory.java

index 9f6520c..3281f04 100644 (file)
@@ -57,13 +57,13 @@ public class CloudConfigFactory implements Serializable {
 
     private static final long serialVersionUID = 2956662716453261085L;
 
-    private CloudConfig cloudConfigCache = new CloudConfig();
+    private static CloudConfig cloudConfigCache = new CloudConfig();
 
     protected static String prefixMsoPropertiesPath = System.getProperty ("mso.config.path");
 
     private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
 
-    private int refreshTimer;
+    private static int refreshTimer;
 
     private static final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock ();
 
@@ -72,7 +72,7 @@ public class CloudConfigFactory implements Serializable {
             prefixMsoPropertiesPath = "";
         }
     }
-
+    
     public void initializeCloudConfig (String filePath, int refreshTimer) throws MsoCloudIdentityNotFound {
         rwl.writeLock ().lock ();
         try {
@@ -105,8 +105,6 @@ public class CloudConfigFactory implements Serializable {
     /**
      * This method is not intended to be called, it's used to refresh the config
      * automatically
-     *
-     * @return true if Properties have been reloaded, false otherwise
      */
     @Schedule(minute = "*/1", hour = "*", persistent = false)
     public void reloadCloudConfig () {