From df6f66110f593b14b22aee3708b61834def72a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Wed, 15 Nov 2023 12:01:26 +0100 Subject: [PATCH] Fix wrong nullability requirement Closes gh-31610 --- .../org/springframework/messaging/support/MessageBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/MessageBuilder.java b/spring-messaging/src/main/java/org/springframework/messaging/support/MessageBuilder.java index 170598ce91..028bbbc524 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/support/MessageBuilder.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/support/MessageBuilder.java @@ -201,7 +201,7 @@ public final class MessageBuilder { * @since 4.1 */ @SuppressWarnings("unchecked") - public static Message createMessage(@Nullable T payload, MessageHeaders messageHeaders) { + public static Message createMessage(T payload, MessageHeaders messageHeaders) { Assert.notNull(payload, "Payload must not be null"); Assert.notNull(messageHeaders, "MessageHeaders must not be null"); if (payload instanceof Throwable throwable) {