From 1dd558aeceffdd98da83f8240cdc3bf8bc182c93 Mon Sep 17 00:00:00 2001 From: Tomasz Nurkiewicz Date: Fri, 27 Nov 2015 12:24:32 -0800 Subject: [PATCH] MINOR: Avoiding warning about generics in sample code Author: Tomasz Nurkiewicz Reviewers: Guozhang Wang Closes #594 from nurkiewicz/patch-1 --- .../java/org/apache/kafka/clients/producer/KafkaProducer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java b/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java index 21d635b1b32..8586439a175 100644 --- a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java +++ b/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java @@ -76,7 +76,7 @@ import org.slf4j.LoggerFactory; * props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer"); * props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer"); * - * Producer producer = new KafkaProducer(props); + * Producer producer = new KafkaProducer<>(props); * for(int i = 0; i < 100; i++) * producer.send(new ProducerRecord("my-topic", Integer.toString(i), Integer.toString(i))); *