From: Surendra Reddy Katam Date: Thu, 20 Sep 2018 06:41:31 +0000 (+0530) Subject: Sonar Major issues X-Git-Tag: 1.1.10~16^2~1 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=37853aa3bd058d4cc80f39cb78f5c0f7be7e036b;p=dmaap%2Fmessagerouter%2Fmsgrtr.git Sonar Major issues This block of commented-out lines of code should be removed Sonar Link: https://sonar.onap.org/project/issues?assignees=surendraReddy&id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&open=AWU41WgPwGn37JfbyHtb&resolved=false&severities=MAJOR Location: src/main/java/com/att/dmf/mr/resources/CambriaOutboundEventStream.java Line No-L482 L493 Change-Id: I897586855c5f6937fc27dadd4639a7bfd7e62629 Issue-ID: DMAAP-803 Signed-off-by: Surendra Reddy Katam --- diff --git a/src/main/java/com/att/dmf/mr/resources/CambriaOutboundEventStream.java b/src/main/java/com/att/dmf/mr/resources/CambriaOutboundEventStream.java index 42ca57b..86a6ef8 100644 --- a/src/main/java/com/att/dmf/mr/resources/CambriaOutboundEventStream.java +++ b/src/main/java/com/att/dmf/mr/resources/CambriaOutboundEventStream.java @@ -479,10 +479,10 @@ public class CambriaOutboundEventStream implements StreamWriter { * * Checks whether filter is initialized */ - /*private boolean isFilterInitialized() { - return (fHpAlarmFilter != null && fHppe != null); - } -*/ + + + + /** * * @param msg @@ -490,18 +490,18 @@ public class CambriaOutboundEventStream implements StreamWriter { */ private boolean filterMatches(String msg) { boolean result = true; - /*if (isFilterInitialized()) { - try { - final HpJsonEvent e = new HpJsonEvent("e", new JSONObject(msg)); - result = fHpAlarmFilter.matches(fHppe, e); - } catch (JSONException x) { - // the msg may not be JSON - result = false; - log.error("Failed due to " + x.getMessage()); - } catch (Exception x) { - log.error("Error using filter: " + x.getMessage(), x); - } - }*/ + + + + + + + + + + + + return result; }