Skip to content

Commit cf06efe

Browse files
committed
Merge branch '6.2.x'
2 parents 6865380 + 5da8d5e commit cf06efe

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

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

Lines changed: 9 additions & 9 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
//---------------------------------------------------------------------------------------
@@ -322,7 +322,7 @@ void convertAndSend(String destinationName, Object message, MessagePostProcessor
322322
* @return the message produced for the consumer, or {@code null} if the timeout expires
323323
* @throws JmsException checked JMSException converted to unchecked
324324
*/
325-
@Nullable Object receiveSelectedAndConvert(String messageSelector) throws JmsException;
325+
@Nullable Object receiveSelectedAndConvert(@Nullable String messageSelector) throws JmsException;
326326

327327
/**
328328
* Receive a message synchronously from the specified destination, but only
@@ -336,7 +336,7 @@ void convertAndSend(String destinationName, Object message, MessagePostProcessor
336336
* @return the message produced for the consumer, or {@code null} if the timeout expires
337337
* @throws JmsException checked JMSException converted to unchecked
338338
*/
339-
@Nullable Object receiveSelectedAndConvert(Destination destination, String messageSelector) throws JmsException;
339+
@Nullable Object receiveSelectedAndConvert(Destination destination, @Nullable String messageSelector) throws JmsException;
340340

341341
/**
342342
* Receive a message synchronously from the specified destination, but only
@@ -351,7 +351,7 @@ void convertAndSend(String destinationName, Object message, MessagePostProcessor
351351
* @return the message produced for the consumer, or {@code null} if the timeout expires
352352
* @throws JmsException checked JMSException converted to unchecked
353353
*/
354-
@Nullable Object receiveSelectedAndConvert(String destinationName, String messageSelector) throws JmsException;
354+
@Nullable Object receiveSelectedAndConvert(String destinationName, @Nullable String messageSelector) throws JmsException;
355355

356356

357357
//---------------------------------------------------------------------------------------
@@ -445,7 +445,7 @@ void convertAndSend(String destinationName, Object message, MessagePostProcessor
445445
* @return the result object from working with the session
446446
* @throws JmsException checked JMSException converted to unchecked
447447
*/
448-
<T> @Nullable T browseSelected(String messageSelector, BrowserCallback<T> action) throws JmsException;
448+
<T> @Nullable T browseSelected(@Nullable String messageSelector, BrowserCallback<T> action) throws JmsException;
449449

450450
/**
451451
* Browse selected messages in a JMS queue. The callback gives access to the JMS
@@ -457,7 +457,7 @@ void convertAndSend(String destinationName, Object message, MessagePostProcessor
457457
* @return the result object from working with the session
458458
* @throws JmsException checked JMSException converted to unchecked
459459
*/
460-
<T> @Nullable T browseSelected(Queue queue, String messageSelector, BrowserCallback<T> action) throws JmsException;
460+
<T> @Nullable T browseSelected(Queue queue, @Nullable String messageSelector, BrowserCallback<T> action) throws JmsException;
461461

462462
/**
463463
* Browse selected messages in a JMS queue. The callback gives access to the JMS
@@ -470,6 +470,6 @@ void convertAndSend(String destinationName, Object message, MessagePostProcessor
470470
* @return the result object from working with the session
471471
* @throws JmsException checked JMSException converted to unchecked
472472
*/
473-
<T> @Nullable T browseSelected(String queueName, String messageSelector, BrowserCallback<T> action) throws JmsException;
473+
<T> @Nullable T browseSelected(String queueName, @Nullable String messageSelector, BrowserCallback<T> action) throws JmsException;
474474

475475
}

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ public void setObservationRegistry(ObservationRegistry observationRegistry) {
541541
}
542542

543543
@Override
544-
public <T> @Nullable T execute(final @Nullable Destination destination, final ProducerCallback<T> action) throws JmsException {
544+
public <T> @Nullable T execute(@Nullable Destination destination, ProducerCallback<T> action) throws JmsException {
545545
Assert.notNull(action, "Callback object must not be null");
546546
return execute(session -> {
547547
MessageProducer producer = createProducer(session, destination);
@@ -555,7 +555,7 @@ public void setObservationRegistry(ObservationRegistry observationRegistry) {
555555
}
556556

557557
@Override
558-
public <T> @Nullable T execute(final String destinationName, final ProducerCallback<T> action) throws JmsException {
558+
public <T> @Nullable T execute(String destinationName, ProducerCallback<T> action) throws JmsException {
559559
Assert.notNull(action, "Callback object must not be null");
560560
return execute(session -> {
561561
Destination destination = resolveDestinationName(session, destinationName);
@@ -586,15 +586,15 @@ public void send(MessageCreator messageCreator) throws JmsException {
586586
}
587587

588588
@Override
589-
public void send(final Destination destination, final MessageCreator messageCreator) throws JmsException {
589+
public void send(Destination destination, MessageCreator messageCreator) throws JmsException {
590590
execute(session -> {
591591
doSend(session, destination, messageCreator);
592592
return null;
593593
}, false);
594594
}
595595

596596
@Override
597-
public void send(final String destinationName, final MessageCreator messageCreator) throws JmsException {
597+
public void send(String destinationName, MessageCreator messageCreator) throws JmsException {
598598
execute(session -> {
599599
Destination destination = resolveDestinationName(session, destinationName);
600600
doSend(session, destination, messageCreator);
@@ -666,12 +666,12 @@ public void convertAndSend(Object message) throws JmsException {
666666
}
667667

668668
@Override
669-
public void convertAndSend(Destination destination, final Object message) throws JmsException {
669+
public void convertAndSend(Destination destination, Object message) throws JmsException {
670670
send(destination, session -> getRequiredMessageConverter().toMessage(message, session));
671671
}
672672

673673
@Override
674-
public void convertAndSend(String destinationName, final Object message) throws JmsException {
674+
public void convertAndSend(String destinationName, Object message) throws JmsException {
675675
send(destinationName, session -> getRequiredMessageConverter().toMessage(message, session));
676676
}
677677

@@ -688,7 +688,7 @@ public void convertAndSend(Object message, MessagePostProcessor postProcessor) t
688688

689689
@Override
690690
public void convertAndSend(
691-
Destination destination, final Object message, final MessagePostProcessor postProcessor)
691+
Destination destination, Object message, MessagePostProcessor postProcessor)
692692
throws JmsException {
693693

694694
send(destination, session -> {
@@ -699,7 +699,7 @@ public void convertAndSend(
699699

700700
@Override
701701
public void convertAndSend(
702-
String destinationName, final Object message, final MessagePostProcessor postProcessor)
702+
String destinationName, Object message, MessagePostProcessor postProcessor)
703703
throws JmsException {
704704

705705
send(destinationName, session -> {
@@ -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);
@@ -746,12 +746,12 @@ public void convertAndSend(
746746
}
747747

748748
@Override
749-
public @Nullable Message receiveSelected(final Destination destination, final @Nullable String messageSelector) throws JmsException {
749+
public @Nullable Message receiveSelected(Destination destination, @Nullable String messageSelector) throws JmsException {
750750
return execute(session -> doReceive(session, destination, messageSelector), true);
751751
}
752752

753753
@Override
754-
public @Nullable Message receiveSelected(final String destinationName, final @Nullable String messageSelector) throws JmsException {
754+
public @Nullable Message receiveSelected(String destinationName, @Nullable String messageSelector) throws JmsException {
755755
return execute(session -> {
756756
Destination destination = resolveDestinationName(session, destinationName);
757757
return doReceive(session, destination, messageSelector);
@@ -833,17 +833,17 @@ else if (isClientAcknowledge(session)) {
833833
}
834834

835835
@Override
836-
public @Nullable Object receiveSelectedAndConvert(String messageSelector) throws JmsException {
836+
public @Nullable Object receiveSelectedAndConvert(@Nullable String messageSelector) throws JmsException {
837837
return doConvertFromMessage(receiveSelected(messageSelector));
838838
}
839839

840840
@Override
841-
public @Nullable Object receiveSelectedAndConvert(Destination destination, String messageSelector) throws JmsException {
841+
public @Nullable Object receiveSelectedAndConvert(Destination destination, @Nullable String messageSelector) throws JmsException {
842842
return doConvertFromMessage(receiveSelected(destination, messageSelector));
843843
}
844844

845845
@Override
846-
public @Nullable Object receiveSelectedAndConvert(String destinationName, String messageSelector) throws JmsException {
846+
public @Nullable Object receiveSelectedAndConvert(String destinationName, @Nullable String messageSelector) throws JmsException {
847847
return doConvertFromMessage(receiveSelected(destinationName, messageSelector));
848848
}
849849

@@ -881,12 +881,12 @@ else if (isClientAcknowledge(session)) {
881881
}
882882

883883
@Override
884-
public @Nullable Message sendAndReceive(final Destination destination, final MessageCreator messageCreator) throws JmsException {
884+
public @Nullable Message sendAndReceive(Destination destination, MessageCreator messageCreator) throws JmsException {
885885
return executeLocal(session -> doSendAndReceive(session, destination, messageCreator), true);
886886
}
887887

888888
@Override
889-
public @Nullable Message sendAndReceive(final String destinationName, final MessageCreator messageCreator) throws JmsException {
889+
public @Nullable Message sendAndReceive(String destinationName, MessageCreator messageCreator) throws JmsException {
890890
return executeLocal(session -> {
891891
Destination destination = resolveDestinationName(session, destinationName);
892892
return doSendAndReceive(session, destination, messageCreator);
@@ -986,7 +986,7 @@ else if (isClientAcknowledge(session)) {
986986
}
987987

988988
@Override
989-
public <T> @Nullable T browseSelected(String messageSelector, BrowserCallback<T> action) throws JmsException {
989+
public <T> @Nullable T browseSelected(@Nullable String messageSelector, BrowserCallback<T> action) throws JmsException {
990990
Queue defaultQueue = getDefaultQueue();
991991
if (defaultQueue != null) {
992992
return browseSelected(defaultQueue, messageSelector, action);
@@ -997,7 +997,7 @@ else if (isClientAcknowledge(session)) {
997997
}
998998

999999
@Override
1000-
public <T> @Nullable T browseSelected(final Queue queue, final @Nullable String messageSelector, final BrowserCallback<T> action)
1000+
public <T> @Nullable T browseSelected(Queue queue, @Nullable String messageSelector, BrowserCallback<T> action)
10011001
throws JmsException {
10021002

10031003
Assert.notNull(action, "Callback object must not be null");
@@ -1013,7 +1013,7 @@ else if (isClientAcknowledge(session)) {
10131013
}
10141014

10151015
@Override
1016-
public <T> @Nullable T browseSelected(final String queueName, final @Nullable String messageSelector, final BrowserCallback<T> action)
1016+
public <T> @Nullable T browseSelected(String queueName, @Nullable String messageSelector, BrowserCallback<T> action)
10171017
throws JmsException {
10181018

10191019
Assert.notNull(action, "Callback object must not be null");

0 commit comments

Comments
 (0)