summaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
authorSumapriya Sarvepalli <ss00493505@techmahindra.com>2018-09-03 16:11:11 +0530
committerSumapriya Sarvepalli <ss00493505@techmahindra.com>2018-09-03 16:11:11 +0530
commit798a24f1fc64c594801b9d7436da1d69205780db (patch)
tree09b9d22f48a781f995f56dc1e9ca0f5e98fd6522 /src/main/java/com
parent04e56beebccf774dfd5cd25e396952e82742ec2b (diff)
Sonar major issues
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=AV4-VakB32hFUzlqc5wM&resolved=false&severities=MAJOR Location: src/main/java/com/att/dmf/mr/service/impl/ApiKeysServiceImpl.java Line No:L57 L142 L168 L199 Change-Id: I21b259d0be16290668230857adb4b71346af6a6c Issue-ID: DMAAP-708 Signed-off-by: Sumapriya Sarvepalli <ss00493505@techmahindra.com>
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/att/dmf/mr/service/impl/ApiKeysServiceImpl.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/com/att/dmf/mr/service/impl/ApiKeysServiceImpl.java b/src/main/java/com/att/dmf/mr/service/impl/ApiKeysServiceImpl.java
index c818f88..b0e8a86 100644
--- a/src/main/java/com/att/dmf/mr/service/impl/ApiKeysServiceImpl.java
+++ b/src/main/java/com/att/dmf/mr/service/impl/ApiKeysServiceImpl.java
@@ -54,7 +54,7 @@ import com.att.nsa.security.db.simple.NsaSimpleApiKey;
@Service
public class ApiKeysServiceImpl implements ApiKeysService {
- //private Logger log = Logger.getLogger(ApiKeysServiceImpl.class.toString());
+
private static final EELFLogger log = EELFManager.getInstance().getLogger(ApiKeysServiceImpl.class.toString());
/**
* This method will provide all the ApiKeys present in kafka server.
@@ -139,7 +139,7 @@ public class ApiKeysServiceImpl implements ApiKeysService {
String kSetting_AllowAnonymousKeys= com.att.ajsc.filemonitor.AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,"apiKeys.allowAnonymous");
if(null==kSetting_AllowAnonymousKeys) kSetting_AllowAnonymousKeys ="false";
- // if ((contactEmail == null) || (contactEmail.length() == 0))
+
if ( kSetting_AllowAnonymousKeys.equalsIgnoreCase("true") && !emailProvided )
{
DMaaPResponseBuilder.respondWithErrorInJson(dmaapContext, 400, "You must provide an email address.");
@@ -165,7 +165,7 @@ public class ApiKeysServiceImpl implements ApiKeysService {
log.debug("=======ApiKeysServiceImpl: createApiKey : saving api key : "
+ key.toString() + "=====");
apiKeyDb.saveApiKey(key);
- // System.out.println("here4");
+
// email out the secret to validate the email address
if ( emailProvided )
{
@@ -196,9 +196,7 @@ public class ApiKeysServiceImpl implements ApiKeysService {
);
DMaaPResponseBuilder.respondOk(dmaapContext,
o);
- /*o.put("secret", "Emailed to " + contactEmail + ".");
- DMaaPResponseBuilder.respondOk(dmaapContext,
- o); */
+
return;
} else {
log.debug("=======ApiKeysServiceImpl: createApiKey : Error in creating API Key.=====");