Repaired an NPE
[holmes/rule-management.git] / rulemgt / src / main / java / org / onap / holmes / rulemgt / RuleActiveApp.java
index c87be76..cd346de 100644 (file)
@@ -61,7 +61,7 @@ public class RuleActiveApp extends IOCApplication<RuleAppConfig> {
             log.warn(e.getMessage(), e);
         }
 
-        if (!System.getenv("TESTING").equals("1")) {
+        if (!"1".equals(System.getenv("TESTING"))) {
             ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();
             service.scheduleAtFixedRate(
                     new DcaeConfigurationPolling(MicroServiceConfig.getEnv(MicroServiceConfig.HOSTNAME)), 0,
@@ -88,7 +88,7 @@ public class RuleActiveApp extends IOCApplication<RuleAppConfig> {
         node.setIp(serviceAddrInfo[0]);
         node.setPort(serviceAddrInfo[1]);
         node.setCheckType("HTTP");
-        node.setCheckUrl(String.format("https://%s:%s/api/holmes-rule-mgmt/v1/healthcheck", serviceAddrInfo[0], serviceAddrInfo[1]));
+        node.setCheckUrl(String.format("https://%s:%s/api/holmes-rule-mgmt/v1/healthcheck", serviceAddrInfo[0], "9101"));
         node.setCheckTimeOut("60s");
         node.setCheckInterval("60s");
         nodes.add(node);