Sonar major issues 53/65453/1
authorSumapriya Sarvepalli <ss00493505@techmahindra.com>
Mon, 10 Sep 2018 07:25:19 +0000 (12:55 +0530)
committerSumapriya Sarvepalli <ss00493505@techmahindra.com>
Mon, 10 Sep 2018 07:25:19 +0000 (12:55 +0530)
 This block of commented-out lines of code should be removed
Sonar Link:
https://sonar.onap.org/project/issues?assignees=sumapriya&id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&open=AWU41WgpwGn37JfbyHt0&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/dmf/mr/security/DMaaPAAFAuthenticatorImpl.java
Line No:L49 L60 L73

Change-Id: Ie1b5bfe9d8741140757355fa92525dd92d677d75
Issue-ID: DMAAP-756
Signed-off-by: Sumapriya Sarvepalli <ss00493505@techmahindra.com>
src/main/java/com/att/dmf/mr/security/DMaaPAAFAuthenticatorImpl.java

index b550373..ed0893d 100644 (file)
@@ -46,7 +46,7 @@ public class DMaaPAAFAuthenticatorImpl implements DMaaPAAFAuthenticator {
                        
                        auth = true;
                }
-               //System.out.println("role " +role +"    user: "+ req.getRemoteUser() +"   : auth="+auth);
+               
                return auth;
        }
 
@@ -57,7 +57,7 @@ public class DMaaPAAFAuthenticatorImpl implements DMaaPAAFAuthenticator {
                String permission = "";
                String nameSpace ="";
                if(topicName.contains(".") && topicName.contains("com.att")) {
-                       //String topic = topicName.substring(topicName.lastIndexOf(".")+1);
+                       
                        nameSpace = topicName.substring(0,topicName.lastIndexOf("."));
                }
                else {
@@ -67,12 +67,7 @@ public class DMaaPAAFAuthenticatorImpl implements DMaaPAAFAuthenticator {
                        if(null==nameSpace)nameSpace="com.att.dmaap.mr.ueb";
                        
                        
-                       /*ErrorResponse errRes = new ErrorResponse(HttpStatus.SC_FORBIDDEN,
-                                       DMaaPResponseCode.TOPIC_NOT_IN_AAF.getResponseCode(), "Topic does not exist in AAF"
-                                                       , null, Utils.getFormattedDate(new Date()), topicName,
-                                       null, null, null, null);
-                                       
-                       throw new CambriaApiException(errRes);*/
+                       
                }
                
                permission = nameSpace+".mr.topic|:topic."+topicName+"|"+action;