From 4ac7c48e91f37471e83cc82d26b26e5b715e8e80 Mon Sep 17 00:00:00 2001 From: Mickael Maison Date: Mon, 18 Sep 2017 12:58:03 -0700 Subject: [PATCH] MINOR: Fix KafkaConsumer.commitSync() javadoc @throws declarations Throws IllegalArgumentException is the offset is negative Author: Mickael Maison Reviewers: Ismael Juma , Jason Gustafson Closes #3780 from mimaison/commitSync_javadoc --- .../org/apache/kafka/clients/consumer/KafkaConsumer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java index 5f63af56ff3..76e4073730c 100644 --- a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java +++ b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java @@ -1168,7 +1168,7 @@ public class KafkaConsumer implements Consumer { * @throws org.apache.kafka.common.errors.AuthorizationException if not authorized to the topic or to the * configured groupId * @throws org.apache.kafka.common.KafkaException for any other unrecoverable errors (e.g. if offset metadata - * is too large or if the committed offset is invalid). + * is too large or if the topic does not exist). */ @Override public void commitSync() { @@ -1204,8 +1204,9 @@ public class KafkaConsumer implements Consumer { * this function is called * @throws org.apache.kafka.common.errors.AuthorizationException if not authorized to the topic or to the * configured groupId + * @throws java.lang.IllegalArgumentException if the committed offset is negative * @throws org.apache.kafka.common.KafkaException for any other unrecoverable errors (e.g. if offset metadata - * is too large or if the committed offset is invalid). + * is too large or if the topic does not exist). */ @Override public void commitSync(final Map offsets) {