diff --git a/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java b/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java index 58cadaa7de9..9c35e4ec2f9 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java @@ -239,7 +239,7 @@ void convertAndSend(String destinationName, Object message, MessagePostProcessor * @return the message received by the consumer, or {@code null} if the timeout expires * @throws JmsException checked JMSException converted to unchecked */ - @Nullable Message receiveSelected(String messageSelector) throws JmsException; + @Nullable Message receiveSelected(@Nullable String messageSelector) throws JmsException; /** * Receive a message synchronously from the specified destination, but only @@ -252,7 +252,7 @@ void convertAndSend(String destinationName, Object message, MessagePostProcessor * @return the message received by the consumer, or {@code null} if the timeout expires * @throws JmsException checked JMSException converted to unchecked */ - @Nullable Message receiveSelected(Destination destination, String messageSelector) throws JmsException; + @Nullable Message receiveSelected(Destination destination, @Nullable String messageSelector) throws JmsException; /** * Receive a message synchronously from the specified destination, but only @@ -266,7 +266,7 @@ void convertAndSend(String destinationName, Object message, MessagePostProcessor * @return the message received by the consumer, or {@code null} if the timeout expires * @throws JmsException checked JMSException converted to unchecked */ - @Nullable Message receiveSelected(String destinationName, String messageSelector) throws JmsException; + @Nullable Message receiveSelected(String destinationName, @Nullable String messageSelector) throws JmsException; //--------------------------------------------------------------------------------------- diff --git a/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java b/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java index 32d6c8c2545..fc80e8100d3 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java @@ -735,7 +735,7 @@ public void convertAndSend( } @Override - public @Nullable Message receiveSelected(String messageSelector) throws JmsException { + public @Nullable Message receiveSelected(@Nullable String messageSelector) throws JmsException { Destination defaultDestination = getDefaultDestination(); if (defaultDestination != null) { return receiveSelected(defaultDestination, messageSelector);