Sonar Major issues 83/66983/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Mon, 17 Sep 2018 12:07:58 +0000 (17:37 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Mon, 17 Sep 2018 12:07:58 +0000 (17:37 +0530)
 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=AWXX4Dp7ligbnTmNIX6R&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java
Line No-L350 L355 L505 L515

Change-Id: Iadb3f456fa170c2430704f752eb6b741e2c8e56e
Issue-ID: DMAAP-782
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java

index 29c7665..cef646e 100644 (file)
@@ -347,12 +347,12 @@ public class TopicServiceImpl implements TopicService {
                if (user == null && null != dmaapContext.getRequest().getHeader("Authorization")) {
                        LOGGER.info("Authenticating the user, as ACL authentication is not provided");
                        // String permission =
-                       // "com.att.dmaap.mr.topic"+"|"+topicName+"|"+"manage";
+                       
                        String permission = "";
                        String nameSpace = topicName.substring(0, topicName.lastIndexOf("."));
                        String mrFactoryVal = AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,
                                        "msgRtr.topicfactory.aaf");
-                       // String tokens[] = topicName.split(".mr.topic.");
+                       
                        permission = mrFactoryVal + nameSpace + "|destroy";
                        DMaaPAAFAuthenticator aaf = new DMaaPAAFAuthenticatorImpl();
                        if (!aaf.aafAuthentication(dmaapContext.getRequest(), permission)) {
@@ -502,7 +502,7 @@ public class TopicServiceImpl implements TopicService {
                //
                
                
-               // if(!aaf.aafAuthentication(dmaapContext.getRequest(), permission))
+               
                // {
                // LOGGER.error("Failed to permit write access to producer [" +
                // producerId + "] for topic " + topicName
@@ -512,7 +512,7 @@ public class TopicServiceImpl implements TopicService {
                // errorMessages.getNotPermitted1()+" <Grant publish permissions>
                
                
-               // throw new DMaaPAccessDeniedException(errRes);
+               
                // }
                // }