Skip to content

Commit

Permalink
Add nullability changes in core/reactive package
Browse files Browse the repository at this point in the history
spring-projects#3762

Signed-off-by: Soby Chacko <[email protected]>
  • Loading branch information
sobychacko committed Feb 25, 2025
1 parent 0e9d3d3 commit efd3484
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -131,20 +131,23 @@ public Flux<String> subscription() {
return subscriptions.flatMapIterable(Function.identity());
}

@SuppressWarnings("NullAway") // Lambda
public Mono<Void> seek(TopicPartition partition, long offset) {
return doOnConsumer(consumer -> {
consumer.seek(partition, offset);
return null;
});
}

@SuppressWarnings("NullAway") // Lambda
public Mono<Void> seekToBeginning(TopicPartition... partitions) {
return doOnConsumer(consumer -> {
consumer.seekToBeginning(Arrays.asList(partitions));
return null;
});
}

@SuppressWarnings("NullAway") // Lambda
public Mono<Void> seekToEnd(TopicPartition... partitions) {
return doOnConsumer(consumer -> {
consumer.seekToEnd(Arrays.asList(partitions));
Expand All @@ -170,13 +173,15 @@ public Flux<TopicPartition> paused() {
return paused.flatMapIterable(Function.identity());
}

@SuppressWarnings("NullAway") // Lambda
public Mono<Void> pause(TopicPartition... partitions) {
return doOnConsumer(c -> {
c.pause(Arrays.asList(partitions));
return null;
});
}

@SuppressWarnings("NullAway") // Lambda
public Mono<Void> resume(TopicPartition... partitions) {
return doOnConsumer(c -> {
c.resume(Arrays.asList(partitions));
Expand Down

0 comments on commit efd3484

Please sign in to comment.