Browse Source

MINOR: Avoiding warning about generics in sample code

Author: Tomasz Nurkiewicz <nurkiewicz@gmail.com>

Reviewers: Guozhang Wang

Closes #594 from nurkiewicz/patch-1
pull/597/head
Tomasz Nurkiewicz 9 years ago committed by Guozhang Wang
parent
commit
1dd558aece
  1. 2
      clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java

2
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java

@ -76,7 +76,7 @@ import org.slf4j.LoggerFactory; @@ -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<String, String> producer = new KafkaProducer(props);
* Producer<String, String> producer = new KafkaProducer<>(props);
* for(int i = 0; i < 100; i++)
* producer.send(new ProducerRecord<String, String>("my-topic", Integer.toString(i), Integer.toString(i)));
*

Loading…
Cancel
Save