diff options
author | Sumapriya Sarvepalli <ss00493505@techmahindra.com> | 2018-08-27 16:43:02 +0530 |
---|---|---|
committer | Sumapriya Sarvepalli <ss00493505@techmahindra.com> | 2018-08-27 16:43:02 +0530 |
commit | 60fdbd167f632d86b967ee3124a142791a7d8158 (patch) | |
tree | e1b193173163975e88ff47b8022242b52bab30e4 /src/main/java | |
parent | b7cd3f4efae963ad5daa34d95911c5acb86e066f (diff) |
Sonar major issues
Replace with the diamond operator
Sonar Link:
https://sonar.onap.org/project/issues?assignees=sumapriya&id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&open=AWVrvBaZxOv3LmQdCiha&resolved=false&severities=MAJOR
Location:
src/main/java/com/att/dmf/mr/backends/kafka/KafkaPublisher.java
Line No:L45 L80 L96
Change-Id: I1ffa790aa3c088d25fe83669b0380dedc33ae234
Issue-ID: DMAAP-655
Signed-off-by: Sumapriya Sarvepalli <ss00493505@techmahindra.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/att/dmf/mr/backends/kafka/KafkaPublisher.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/main/java/com/att/dmf/mr/backends/kafka/KafkaPublisher.java b/src/main/java/com/att/dmf/mr/backends/kafka/KafkaPublisher.java index 9543828..735e372 100644 --- a/src/main/java/com/att/dmf/mr/backends/kafka/KafkaPublisher.java +++ b/src/main/java/com/att/dmf/mr/backends/kafka/KafkaPublisher.java @@ -42,10 +42,6 @@ import com.att.eelf.configuration.EELFManager; import com.att.nsa.drumlin.till.nv.rrNvReadable; -//import kafka.javaapi.producer.Producer; -//import kafka.producer.KeyedMessage; -//import kafka.producer.ProducerConfig; -//import kafka.producer.KeyedMessage; /** * Sends raw JSON objects into Kafka. @@ -77,8 +73,7 @@ public class KafkaPublisher implements Publisher { kafkaConnUrl="localhost:9092"; } - // props.put("bootstrap.servers", bootSever); - //System.setProperty("java.security.auth.login.config",jaaspath); + transferSetting( props, "bootstrap.servers",kafkaConnUrl); @@ -93,7 +88,7 @@ public class KafkaPublisher implements Publisher { props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer"); - //fProducer = new Producer<String, String>(fConfig); + fProducer = new KafkaProducer<>(props); } |