Repository: kafka
Updated Branches:
  refs/heads/trunk ae3eeb3e1 -> 4ac7c48e9


MINOR: Fix KafkaConsumer.commitSync() javadoc @throws declarations

Throws IllegalArgumentException is the offset is negative

Author: Mickael Maison <[email protected]>

Reviewers: Ismael Juma <[email protected]>, Jason Gustafson <[email protected]>

Closes #3780 from mimaison/commitSync_javadoc


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/4ac7c48e
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/4ac7c48e
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/4ac7c48e

Branch: refs/heads/trunk
Commit: 4ac7c48e91f37471e83cc82d26b26e5b715e8e80
Parents: ae3eeb3
Author: Mickael Maison <[email protected]>
Authored: Mon Sep 18 12:58:03 2017 -0700
Committer: Jason Gustafson <[email protected]>
Committed: Mon Sep 18 12:58:30 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/kafka/clients/consumer/KafkaConsumer.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/4ac7c48e/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
----------------------------------------------------------------------
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 5f63af5..76e4073 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<K, V> implements Consumer<K, 
V> {
      * @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<K, V> implements Consumer<K, 
V> {
      *             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<TopicPartition, OffsetAndMetadata> 
offsets) {

Reply via email to