kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maniku...@apache.org
Subject [kafka] branch trunk updated: MINOR: Hygiene fixes in KafkaFutureImpl (#5098)
Date Fri, 21 Dec 2018 09:02:32 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 6841849  MINOR: Hygiene fixes in KafkaFutureImpl (#5098)
6841849 is described below

commit 684184973e27f1f072bb194acf55706860db237f
Author: Viktor Somogyi <viktorsomogyi@gmail.com>
AuthorDate: Fri Dec 21 10:02:22 2018 +0100

    MINOR: Hygiene fixes in KafkaFutureImpl (#5098)
    
    Change-Id: Ia44c6c659418bbed5367645b814725365daba820
---
 .../java/org/apache/kafka/common/internals/KafkaFutureImpl.java     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

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 d610172..c0babe1 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
@@ -152,7 +152,7 @@ public class KafkaFutureImpl<T> extends KafkaFuture<T> {
     }
 
     /**
-     * @See KafkaFutureImpl#thenApply(BaseFunction)
+     * @see KafkaFutureImpl#thenApply(BaseFunction)
      */
     @Override
     public <R> KafkaFuture<R> thenApply(Function<T, R> function) {
@@ -247,9 +247,7 @@ public class KafkaFutureImpl<T> extends KafkaFuture<T> {
      */
     @Override
     public synchronized boolean cancel(boolean mayInterruptIfRunning) {
-        if (completeExceptionally(new CancellationException()))
-            return true;
-        return exception instanceof CancellationException;
+        return completeExceptionally(new CancellationException()) || exception instanceof
CancellationException;
     }
 
     /**


Mime
View raw message