Sonar Major issues
[dmaap/messagerouter/msgrtr.git] / src / main / java / com / att / dmf / mr / service / impl / EventsServiceImpl.java
index 22b60fe..5565704 100644 (file)
@@ -376,7 +376,7 @@ public class EventsServiceImpl implements EventsService {
                String topicNameStd = null;
 
                // topicNameStd=
-               // ctx.getConfigReader().getSettings().getString("enforced.topic.name.AAF");
+               
                topicNameStd = com.att.ajsc.beans.PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop,
                                "enforced.topic.name.AAF");
                String metricTopicname = com.att.ajsc.filemonitor.AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,
@@ -404,7 +404,7 @@ public class EventsServiceImpl implements EventsService {
                if (topicNameEnforced || (user == null && null != ctx.getRequest().getHeader("Authorization")
                                && !topic.equalsIgnoreCase(metricTopicname))) {
                        // the topic name will be sent by the client
-                       // String permission = "com.att.dmaap.mr.topic"+"|"+topic+"|"+"pub";
+               
                        DMaaPAAFAuthenticator aaf = new DMaaPAAFAuthenticatorImpl();
                        String permission = aaf.aafPermissionString(topic, "pub");
                        if (!aaf.aafAuthentication(ctx.getRequest(), permission)) {
@@ -486,10 +486,10 @@ public class EventsServiceImpl implements EventsService {
                if (null != batchlen)
                        maxEventBatch = Long.parseLong(batchlen);
                // long maxEventBatch =
-               // ctx.getConfigReader().getSettings().getLong(BATCH_LENGTH, 1024 * 16);
+               
                final LinkedList<Publisher.message> batch = new LinkedList<>();
                // final ArrayList<KeyedMessage<String, String>> kms = new
-               // ArrayList<KeyedMessage<String, String>>();
+       
                final ArrayList<ProducerRecord<String, String>> pms = new ArrayList<>();
                try {
                        // for each message...
@@ -499,7 +499,7 @@ public class EventsServiceImpl implements EventsService {
                                batch.add(m);
                                // final KeyedMessage<String, String> data = new
                                // KeyedMessage<String, String>(topic, m.getKey(),
-                               // m.getMessage());
+                       
                                // kms.add(data);
                                final ProducerRecord<String, String> data = new ProducerRecord<String, String>(topic, m.getKey(),
                                                m.getMessage());
@@ -509,7 +509,7 @@ public class EventsServiceImpl implements EventsService {
                                final int sizeNow = batch.size();
                                if (sizeNow > maxEventBatch) {
                                        // ctx.getConfigReader().getfPublisher().sendBatchMessage(topic,
-                                       // kms);
+                               
                                        // kms.clear();
                                        ctx.getConfigReader().getfPublisher().sendBatchMessageNew(topic, pms);
                                        pms.clear();