Skip to content

Commit 78c23d2

Browse files
committed
Remove @Nullable from MessageBatchRecoverer contract
1 parent 312f129 commit 78c23d2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/MessageBatchRecoverer.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
import java.util.List;
2020

21-
import org.jspecify.annotations.Nullable;
22-
2321
import org.springframework.amqp.core.Message;
2422

2523
/**
@@ -37,15 +35,15 @@
3735
public interface MessageBatchRecoverer extends MessageRecoverer {
3836

3937
@Override
40-
default void recover(Message message, @Nullable Throwable cause) {
38+
default void recover(Message message, Throwable cause) {
4139
throw new IllegalStateException("MessageBatchRecoverer configured with a non-batch listener");
4240
}
4341

4442
/**
45-
* Callback for message batch that was consumed but failed all retry attempts.
43+
* Callback for a message batch that was consumed but failed all retry attempts.
4644
* @param messages the messages to recover
4745
* @param cause the cause of the error
4846
*/
49-
void recover(List<Message> messages, @Nullable Throwable cause);
47+
void recover(List<Message> messages, Throwable cause);
5048

5149
}

0 commit comments

Comments
 (0)