Skip to content

Commit 1e003a1

Browse files
committed
Remove unnecessary assertion
Issue: SPR-14279
1 parent 4a81aab commit 1e003a1

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

spring-messaging/src/main/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandler.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -223,12 +223,6 @@ protected void handleMessageInternal(Message<?> message) {
223223
return;
224224
}
225225

226-
SimpMessageHeaderAccessor accessor = MessageHeaderAccessor.getAccessor(message, SimpMessageHeaderAccessor.class);
227-
if (accessor == null) {
228-
throw new IllegalStateException(
229-
"No header accessor (not using the SimpMessagingTemplate?): " + message);
230-
}
231-
232226
if (SimpMessageType.MESSAGE.equals(messageType)) {
233227
logMessage(message);
234228
sendMessageToSubscribers(destination, message);

0 commit comments

Comments
 (0)