MINOR: Remove unused LeaderAndIsrResponse.partitions() since it has been replaced with partitionErrors()
Reviewers: David Jacot
@@ -20,11 +20,9 @@ import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.Uuid;
import org.apache.kafka.common.message.LeaderAndIsrResponseData;
import org.apache.kafka.common.message.LeaderAndIsrResponseData.LeaderAndIsrTopicError;
-import org.apache.kafka.common.message.LeaderAndIsrResponseData.LeaderAndIsrPartitionError;
import org.apache.kafka.common.protocol.ApiKeys;
import org.apache.kafka.common.protocol.ByteBufferAccessor;
import org.apache.kafka.common.protocol.Errors;
-import org.apache.kafka.common.utils.FlattenedIterator;
import java.nio.ByteBuffer;
import java.util.Collections;
@@ -53,14 +51,6 @@ public class LeaderAndIsrResponse extends AbstractResponse {
return this.data.topics();
}
- public Iterable<LeaderAndIsrPartitionError> partitions() {
- if (version < 5) {
- return data.partitionErrors();
- }
- return () -> new FlattenedIterator<>(data.topics().iterator(),
- topic -> topic.partitionErrors().iterator());
- }
-
public Errors error() {
return Errors.forCode(data.errorCode());
}
