From: Sahani Ravindrana Naik Date: Wed, 9 May 2018 06:25:42 +0000 (+0530) Subject: sonar critical for conditional statement X-Git-Tag: 2.0.0-ONAP~4^2~1 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F41%2F46741%2F1;p=dmaap%2Fmessagerouter%2Fmsgrtr.git sonar critical for conditional statement This line will not be executed conditionally; only the first line of this 2-line block will be. The rest will execute unconditionally Sonar Link: https://sonar.onap.org/project/issues?assignees=Sahani_Naik&id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&resolved=false Location: src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java Line No-166 Change-Id: I8e07515bb42960205f7f4982d99184cf946402ac Issue-ID: DMAAP-480 Signed-off-by: Sahani Ravindrana Naik --- diff --git a/src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java b/src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java index 7875b90..bfd005e 100644 --- a/src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java +++ b/src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java @@ -163,7 +163,9 @@ public class TopicServiceImpl implements TopicService { if (null!=t.getOwners ()) o.put ( "owner", t.getOwners ().iterator ().next () ); if(null!=t.getReaderAcl ()) - o.put ( "readerAcl", aclToJson ( t.getReaderAcl () ) ); + { + o.put ( "readerAcl", aclToJson ( t.getReaderAcl () ) ); + } if(null!=t.getWriterAcl ()) o.put ( "writerAcl", aclToJson ( t.getWriterAcl () ) );