From f9480667107058a4562ef33a241bdb3937f51167 Mon Sep 17 00:00:00 2001 From: Clint Wylie Date: Fri, 2 Mar 2018 17:26:12 -0800 Subject: [PATCH] KafkaIndexTask remove branch with unreachable code (#5434) --- .../druid/indexing/kafka/KafkaIndexTask.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/KafkaIndexTask.java b/extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/KafkaIndexTask.java index fed3499f7dc..6ebf4a83500 100644 --- a/extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/KafkaIndexTask.java +++ b/extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/KafkaIndexTask.java @@ -856,17 +856,13 @@ public class KafkaIndexTask extends AbstractTask implements ChatHandler } for (SegmentsAndMetadata handedOff : handedOffList) { - if (handedOff == null) { - log.warn("Handoff failed for segments %s", handedOff.getSegments()); - } else { - log.info( - "Handoff completed for segments[%s] with metadata[%s].", - Joiner.on(", ").join( - handedOff.getSegments().stream().map(DataSegment::getIdentifier).collect(Collectors.toList()) - ), - Preconditions.checkNotNull(handedOff.getCommitMetadata(), "commitMetadata") - ); - } + log.info( + "Handoff completed for segments[%s] with metadata[%s].", + Joiner.on(", ").join( + handedOff.getSegments().stream().map(DataSegment::getIdentifier).collect(Collectors.toList()) + ), + Preconditions.checkNotNull(handedOff.getCommitMetadata(), "commitMetadata") + ); } } catch (InterruptedException | RejectedExecutionException e) {