|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2018 the original author or authors. |
| 2 | + * Copyright 2002-2019 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -407,16 +407,17 @@ public boolean send(Message<?> message) {
|
407 | 407 | * is interrupted. If the specified timeout is 0, the method will return
|
408 | 408 | * immediately. If less than zero, it will block indefinitely (see
|
409 | 409 | * {@link #send(Message)}).
|
410 |
| - * @param message the Message to send |
| 410 | + * @param messageArg the Message to send |
411 | 411 | * @param timeout the timeout in milliseconds
|
412 | 412 | * @return <code>true</code> if the message is sent successfully,
|
413 | 413 | * <code>false</code> if the message cannot be sent within the allotted
|
414 | 414 | * time or the sending thread is interrupted.
|
415 | 415 | */
|
416 | 416 | @Override
|
417 |
| - public boolean send(Message<?> message, long timeout) { |
418 |
| - Assert.notNull(message, "message must not be null"); |
419 |
| - Assert.notNull(message.getPayload(), "message payload must not be null"); |
| 417 | + public boolean send(Message<?> messageArg, long timeout) { |
| 418 | + Assert.notNull(messageArg, "message must not be null"); |
| 419 | + Assert.notNull(messageArg.getPayload(), "message payload must not be null"); |
| 420 | + Message<?> message = messageArg; |
420 | 421 | if (this.shouldTrack) {
|
421 | 422 | message = MessageHistory.write(message, this, this.getMessageBuilderFactory());
|
422 | 423 | }
|
@@ -596,8 +597,10 @@ public void add(int index, ChannelInterceptor interceptor) {
|
596 | 597 | }
|
597 | 598 |
|
598 | 599 | @Nullable
|
599 |
| - public Message<?> preSend(Message<?> message, MessageChannel channel, |
| 600 | + public Message<?> preSend(Message<?> messageArg, MessageChannel channel, |
600 | 601 | Deque<ChannelInterceptor> interceptorStack) {
|
| 602 | + |
| 603 | + Message<?> message = messageArg; |
601 | 604 | if (this.size > 0) {
|
602 | 605 | for (ChannelInterceptor interceptor : this.interceptors) {
|
603 | 606 | Message<?> previous = message;
|
@@ -652,7 +655,8 @@ public boolean preReceive(MessageChannel channel, Deque<ChannelInterceptor> inte
|
652 | 655 | }
|
653 | 656 |
|
654 | 657 | @Nullable
|
655 |
| - public Message<?> postReceive(Message<?> message, MessageChannel channel) { |
| 658 | + public Message<?> postReceive(Message<?> messageArg, MessageChannel channel) { |
| 659 | + Message<?> message = messageArg; |
656 | 660 | if (this.size > 0) {
|
657 | 661 | for (ChannelInterceptor interceptor : this.interceptors) {
|
658 | 662 | message = interceptor.postReceive(message, channel);
|
|
0 commit comments