[SLICEMS]Fix bug that config thread hang up when cbs policy is empty
[dcaegen2/services.git] / components / slice-analysis-ms / src / main / java / org / onap / slice / analysis / ms / service / ConfigThread.java
index 61e445d..0bd41e2 100644 (file)
@@ -47,8 +47,7 @@ public class ConfigThread extends Thread{
             try {\r
                 Thread.sleep(1000);\r
                 ConfigPolicy configPolicy = ConfigPolicy.getInstance();\r
-                if(configPolicy != null) {\r
-                    // config content\r
+                if(configPolicy.getConfig() != null) {\r
                     String cllId = null;\r
                     Boolean clBwAssuranceStatus = null;\r
                     int originalBw = 0;\r
@@ -65,7 +64,7 @@ public class ConfigThread extends Thread{
                         ccvpnPmDatastore.updateConfigFromPolicy(cllId, clBwAssuranceStatus, originalBw);\r
                     }\r
                 } else {\r
-                    log.debug("Config policy is empty, nothing to update.");\r
+                    log.error("Config policy is empty, nothing to update.");\r
                 }\r
 \r
             } catch (Exception e) {\r