Skip to content

Commit 6e4c3d1

Browse files
committed
Improve Nullability for the AsyncAmqpTemplate
* Fix `AsyncAmqpTemplate` Javadoc typos.
1 parent 4226b9e commit 6e4c3d1

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

spring-amqp/src/main/java/org/springframework/amqp/core/AsyncAmqpTemplate.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ default <R, S> CompletableFuture<Boolean> receiveAndReply(ReceiveAndReplyCallbac
113113
* @param <S> the response body type
114114
* @param queueName the queue to consume request.
115115
* @param callback an application callback to handle request and produce reply.
116-
* @return the completion status: true if no errors and reply has been produced.
116+
* @return the completion status: true if no errors, and reply has been produced.
117117
*/
118118
default <R, S> CompletableFuture<Boolean> receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> callback) {
119119
throw new UnsupportedOperationException();
@@ -144,7 +144,7 @@ default <R, S> CompletableFuture<Boolean> receiveAndReply(String queueName, Rece
144144
* @param message the message.
145145
* @return the {@link CompletableFuture}.
146146
*/
147-
CompletableFuture<Message> sendAndReceive(String exchange, String routingKey, Message message);
147+
CompletableFuture<Message> sendAndReceive(String exchange, @Nullable String routingKey, Message message);
148148

149149
/**
150150
* Convert the object to a message and send it to the default exchange with the
@@ -174,14 +174,14 @@ default <R, S> CompletableFuture<Boolean> receiveAndReply(String queueName, Rece
174174
* @param <C> the expected result type.
175175
* @return the {@link CompletableFuture}.
176176
*/
177-
<C> CompletableFuture<C> convertSendAndReceive(String exchange, String routingKey, Object object);
177+
<C> CompletableFuture<C> convertSendAndReceive(String exchange, @Nullable String routingKey, Object object);
178178

179179
/**
180180
* Convert the object to a message and send it to the default exchange with the
181181
* default routing key after invoking the {@link MessagePostProcessor}.
182-
* If the post processor adds a correlationId property, it must be unique.
182+
* If the post-processor adds a correlationId property, it must be unique.
183183
* @param object the object to convert.
184-
* @param messagePostProcessor the post processor.
184+
* @param messagePostProcessor the post-processor.
185185
* @param <C> the expected result type.
186186
* @return the {@link CompletableFuture}.
187187
*/
@@ -190,10 +190,10 @@ default <R, S> CompletableFuture<Boolean> receiveAndReply(String queueName, Rece
190190
/**
191191
* Convert the object to a message and send it to the default exchange with the
192192
* provided routing key after invoking the {@link MessagePostProcessor}.
193-
* If the post processor adds a correlationId property, it must be unique.
193+
* If the post-processor adds a correlationId property, it must be unique.
194194
* @param routingKey the routing key.
195195
* @param object the object to convert.
196-
* @param messagePostProcessor the post processor.
196+
* @param messagePostProcessor the post-processor.
197197
* @param <C> the expected result type.
198198
* @return the {@link CompletableFuture}.
199199
*/
@@ -203,15 +203,15 @@ <C> CompletableFuture<C> convertSendAndReceive(String routingKey, Object object,
203203
/**
204204
* Convert the object to a message and send it to the provided exchange and
205205
* routing key after invoking the {@link MessagePostProcessor}.
206-
* If the post processor adds a correlationId property, it must be unique.
206+
* If the post-processor adds a correlationId property, it must be unique.
207207
* @param exchange the exchange
208208
* @param routingKey the routing key.
209209
* @param object the object to convert.
210-
* @param messagePostProcessor the post processor.
210+
* @param messagePostProcessor the post-processor.
211211
* @param <C> the expected result type.
212212
* @return the {@link CompletableFuture}.
213213
*/
214-
<C> CompletableFuture<C> convertSendAndReceive(String exchange, String routingKey, Object object,
214+
<C> CompletableFuture<C> convertSendAndReceive(String exchange, @Nullable String routingKey, Object object,
215215
@Nullable MessagePostProcessor messagePostProcessor);
216216

217217
/**
@@ -246,15 +246,15 @@ <C> CompletableFuture<C> convertSendAndReceiveAsType(String routingKey, Object o
246246
* @param <C> the expected result type.
247247
* @return the {@link CompletableFuture}.
248248
*/
249-
<C> CompletableFuture<C> convertSendAndReceiveAsType(String exchange, String routingKey, Object object,
249+
<C> CompletableFuture<C> convertSendAndReceiveAsType(String exchange, @Nullable String routingKey, Object object,
250250
ParameterizedTypeReference<C> responseType);
251251

252252
/**
253253
* Convert the object to a message and send it to the default exchange with the
254254
* default routing key after invoking the {@link MessagePostProcessor}.
255-
* If the post processor adds a correlationId property, it must be unique.
255+
* If the post-processor adds a correlationId property, it must be unique.
256256
* @param object the object to convert.
257-
* @param messagePostProcessor the post processor.
257+
* @param messagePostProcessor the post-processor.
258258
* @param responseType the response type.
259259
* @param <C> the expected result type.
260260
* @return the {@link CompletableFuture}.
@@ -266,10 +266,10 @@ <C> CompletableFuture<C> convertSendAndReceiveAsType(Object object,
266266
/**
267267
* Convert the object to a message and send it to the default exchange with the
268268
* provided routing key after invoking the {@link MessagePostProcessor}.
269-
* If the post processor adds a correlationId property, it must be unique.
269+
* If the post-processor adds a correlationId property, it must be unique.
270270
* @param routingKey the routing key.
271271
* @param object the object to convert.
272-
* @param messagePostProcessor the post processor.
272+
* @param messagePostProcessor the post-processor.
273273
* @param responseType the response type.
274274
* @param <C> the expected result type.
275275
* @return the {@link CompletableFuture}.
@@ -280,16 +280,16 @@ <C> CompletableFuture<C> convertSendAndReceiveAsType(String routingKey, Object o
280280
/**
281281
* Convert the object to a message and send it to the provided exchange and
282282
* routing key after invoking the {@link MessagePostProcessor}.
283-
* If the post processor adds a correlationId property, it must be unique.
283+
* If the post-processor adds a correlationId property, it must be unique.
284284
* @param exchange the exchange
285285
* @param routingKey the routing key.
286286
* @param object the object to convert.
287-
* @param messagePostProcessor the post processor.
287+
* @param messagePostProcessor the post-processor.
288288
* @param responseType the response type.
289289
* @param <C> the expected result type.
290290
* @return the {@link CompletableFuture}.
291291
*/
292-
<C> CompletableFuture<C> convertSendAndReceiveAsType(String exchange, String routingKey, Object object,
292+
<C> CompletableFuture<C> convertSendAndReceiveAsType(String exchange, @Nullable String routingKey, Object object,
293293
@Nullable MessagePostProcessor messagePostProcessor, @Nullable ParameterizedTypeReference<C> responseType);
294294

295295
}

0 commit comments

Comments
 (0)