Declare messageSelector parameters in JmsOperations as @⁠Nullable

See gh-35151

Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com>
This commit is contained in:
Jiandong Ma
2025-07-03 19:17:49 +02:00
committed by Sam Brannen
parent 15364cf59f
commit b6675edb92
2 changed files with 4 additions and 4 deletions
@@ -247,7 +247,7 @@ public interface JmsOperations {
* @throws JmsException checked JMSException converted to unchecked
*/
@Nullable
Message receiveSelected(String messageSelector) throws JmsException;
Message receiveSelected(@Nullable String messageSelector) throws JmsException;
/**
* Receive a message synchronously from the specified destination, but only
@@ -261,7 +261,7 @@ public interface JmsOperations {
* @throws JmsException checked JMSException converted to unchecked
*/
@Nullable
Message receiveSelected(Destination destination, String messageSelector) throws JmsException;
Message receiveSelected(Destination destination, @Nullable String messageSelector) throws JmsException;
/**
* Receive a message synchronously from the specified destination, but only
@@ -276,7 +276,7 @@ public interface JmsOperations {
* @throws JmsException checked JMSException converted to unchecked
*/
@Nullable
Message receiveSelected(String destinationName, String messageSelector) throws JmsException;
Message receiveSelected(String destinationName, @Nullable String messageSelector) throws JmsException;
//---------------------------------------------------------------------------------------
@@ -751,7 +751,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
@Override
@Nullable
public Message receiveSelected(String messageSelector) throws JmsException {
public Message receiveSelected(@Nullable String messageSelector) throws JmsException {
Destination defaultDestination = getDefaultDestination();
if (defaultDestination != null) {
return receiveSelected(defaultDestination, messageSelector);