sonar critical for error handling 67/31067/1
authorDushyant Singh Thakur <dt00503496@techmahindra.com>
Fri, 9 Feb 2018 11:45:58 +0000 (17:15 +0530)
committerDushyant Singh Thakur <dt00503496@techmahindra.com>
Fri, 9 Feb 2018 11:45:58 +0000 (17:15 +0530)
Either log or rethrow this exception
Sonar Link:
https://sonar.onap.org/component_issues?id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr#resolved=false|assignees=dthakur
Location:
src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumerCache.java
Line No-402

Change-Id: Iaf198076abab39a20b8baa8456cc8b0abecf7607
Issue-ID: DMAAP-288
Signed-off-by: Dushyant Singh Thakur <dt00503496@techmahindra.com>
src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumerCache.java

index 5f38443..8cb6f3c 100644 (file)
@@ -400,8 +400,7 @@ public class KafkaConsumerCache {
                try {
                        curator.delete().guaranteed().forPath(fBaseZkPath + "/" + key);
                } catch (NoNodeException e) {
-                       log.warn("A consumer was deleted from " + fApiId
-                                       + "'s cache, but no Cambria API node had ownership of it in ZooKeeper");
+                       log.error("Exception at : " + e);
                } catch (Exception e) {
                        log.debug("Unexpected exception while deleting consumer: " + e.getMessage());
                }