Fix for sonar critical issues.
[ccsdk/sli/plugins.git] / restconf-client / provider / src / main / java / org / onap / ccsdk / sli / plugins / restconfdiscovery / RestconfDiscoveryNode.java
index 0490b3a..f5366a5 100644 (file)
@@ -85,7 +85,7 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin {
 
             establishPersistentConnection(paramMap, ctx, subscriberId);
         } else {
-            log.info("Failed to subscribe " + subscriberId);
+            log.info("Failed to subscribe {}", subscriberId);
             throw new SvcLogicException(ctx.getAttribute(RESPONSE_CODE));
         }
     }
@@ -131,7 +131,8 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin {
                 try {
                     Thread.sleep(5000);
                 } catch (InterruptedException e) {
-                    log.error("Exception: " + e.getMessage());
+                    log.error("Interrupted!", e);
+                    Thread.currentThread().interrupt();
                 }
             }
             eventSource.close();