kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [kafka] branch 1.1 updated: MINOR: KafkaFutureImpl#addWaiter should be protected (#4734)
Date Mon, 19 Mar 2018 20:32:08 GMT
This is an automated email from the ASF dual-hosted git repository.

jgus pushed a commit to branch 1.1
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/1.1 by this push:
     new fcc03c0  MINOR: KafkaFutureImpl#addWaiter should be protected (#4734)
fcc03c0 is described below

commit fcc03c01dcd24ae2de91b16f427e83ec3d7bff7e
Author: Colin Patrick McCabe <colin@cmccabe.xyz>
AuthorDate: Mon Mar 19 13:30:13 2018 -0700

    MINOR: KafkaFutureImpl#addWaiter should be protected (#4734)
    
    KafkaFutureImpl#addWaiter should be protected, just like KafkaFuture#addWaiter.  As described
in KIP-218, whenComplete is the public API, not addWaiter.
---
 .../main/java/org/apache/kafka/common/internals/KafkaFutureImpl.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clients/src/main/java/org/apache/kafka/common/internals/KafkaFutureImpl.java
b/clients/src/main/java/org/apache/kafka/common/internals/KafkaFutureImpl.java
index 049ed49..b1e5b6d 100644
--- a/clients/src/main/java/org/apache/kafka/common/internals/KafkaFutureImpl.java
+++ b/clients/src/main/java/org/apache/kafka/common/internals/KafkaFutureImpl.java
@@ -192,7 +192,7 @@ public class KafkaFutureImpl<T> extends KafkaFuture<T> {
         return future;
     }
 
-    public synchronized void addWaiter(BiConsumer<? super T, ? super Throwable> action)
{
+    protected synchronized void addWaiter(BiConsumer<? super T, ? super Throwable>
action) {
         if (exception != null) {
             action.accept(null, exception);
         } else if (done) {

-- 
To stop receiving notification emails like this one, please contact
jgus@apache.org.

Mime
View raw message