sonar critical for conditional statement 41/46741/1
authorSahani Ravindrana Naik <sn00552219@techmahindra.com>
Wed, 9 May 2018 06:25:42 +0000 (11:55 +0530)
committerSahani Ravindrana Naik <sn00552219@techmahindra.com>
Wed, 9 May 2018 06:25:42 +0000 (11:55 +0530)
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 <sn00552219@techmahindra.com>
src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java

index 7875b90..bfd005e 100644 (file)
@@ -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 () ) );