diff --git a/spring-kafka/src/main/java/org/springframework/kafka/core/reactive/ReactiveKafkaConsumerTemplate.java b/spring-kafka/src/main/java/org/springframework/kafka/core/reactive/ReactiveKafkaConsumerTemplate.java index cd5aaf3f..684b9268 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/core/reactive/ReactiveKafkaConsumerTemplate.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/core/reactive/ReactiveKafkaConsumerTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -131,6 +131,7 @@ public class ReactiveKafkaConsumerTemplate { return subscriptions.flatMapIterable(Function.identity()); } + @SuppressWarnings("NullAway") // Lambda public Mono seek(TopicPartition partition, long offset) { return doOnConsumer(consumer -> { consumer.seek(partition, offset); @@ -138,6 +139,7 @@ public class ReactiveKafkaConsumerTemplate { }); } + @SuppressWarnings("NullAway") // Lambda public Mono seekToBeginning(TopicPartition... partitions) { return doOnConsumer(consumer -> { consumer.seekToBeginning(Arrays.asList(partitions)); @@ -145,6 +147,7 @@ public class ReactiveKafkaConsumerTemplate { }); } + @SuppressWarnings("NullAway") // Lambda public Mono seekToEnd(TopicPartition... partitions) { return doOnConsumer(consumer -> { consumer.seekToEnd(Arrays.asList(partitions)); @@ -170,6 +173,7 @@ public class ReactiveKafkaConsumerTemplate { return paused.flatMapIterable(Function.identity()); } + @SuppressWarnings("NullAway") // Lambda public Mono pause(TopicPartition... partitions) { return doOnConsumer(c -> { c.pause(Arrays.asList(partitions)); @@ -177,6 +181,7 @@ public class ReactiveKafkaConsumerTemplate { }); } + @SuppressWarnings("NullAway") // Lambda public Mono resume(TopicPartition... partitions) { return doOnConsumer(c -> { c.resume(Arrays.asList(partitions));