Skip to content

Commit 03590a3

Browse files
committed
Apply @Nullable on parameter messageSelector in Jms module
Signed-off-by: Jiandong Ma <[email protected]>
1 parent 26d413c commit 03590a3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ void convertAndSend(String destinationName, Object message, MessagePostProcessor
239239
* @return the message received by the consumer, or {@code null} if the timeout expires
240240
* @throws JmsException checked JMSException converted to unchecked
241241
*/
242-
@Nullable Message receiveSelected(String messageSelector) throws JmsException;
242+
@Nullable Message receiveSelected(@Nullable String messageSelector) throws JmsException;
243243

244244
/**
245245
* Receive a message synchronously from the specified destination, but only
@@ -252,7 +252,7 @@ void convertAndSend(String destinationName, Object message, MessagePostProcessor
252252
* @return the message received by the consumer, or {@code null} if the timeout expires
253253
* @throws JmsException checked JMSException converted to unchecked
254254
*/
255-
@Nullable Message receiveSelected(Destination destination, String messageSelector) throws JmsException;
255+
@Nullable Message receiveSelected(Destination destination, @Nullable String messageSelector) throws JmsException;
256256

257257
/**
258258
* Receive a message synchronously from the specified destination, but only
@@ -266,7 +266,7 @@ void convertAndSend(String destinationName, Object message, MessagePostProcessor
266266
* @return the message received by the consumer, or {@code null} if the timeout expires
267267
* @throws JmsException checked JMSException converted to unchecked
268268
*/
269-
@Nullable Message receiveSelected(String destinationName, String messageSelector) throws JmsException;
269+
@Nullable Message receiveSelected(String destinationName, @Nullable String messageSelector) throws JmsException;
270270

271271

272272
//---------------------------------------------------------------------------------------

spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ public void convertAndSend(
735735
}
736736

737737
@Override
738-
public @Nullable Message receiveSelected(String messageSelector) throws JmsException {
738+
public @Nullable Message receiveSelected(@Nullable String messageSelector) throws JmsException {
739739
Destination defaultDestination = getDefaultDestination();
740740
if (defaultDestination != null) {
741741
return receiveSelected(defaultDestination, messageSelector);

0 commit comments

Comments
 (0)