Skip to content

Commit 4b58bf0

Browse files
committed
Fix AMQP module according latest Spring AMQP
1 parent 06140cb commit 4b58bf0

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/EndpointUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
package org.springframework.integration.amqp.support;
1818

1919
import org.springframework.amqp.core.Message;
20-
import org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException;
20+
import org.springframework.amqp.rabbit.support.ListenerExecutionFailedException;
2121

2222
import com.rabbitmq.client.Channel;
2323

2424
/**
2525
* Utility methods for messaging endpoints.
2626
*
2727
* @author Gary Russell
28+
*
2829
* @since 5.1.3
2930
*
3031
*/

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/ManualAckListenerExecutionFailedException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package org.springframework.integration.amqp.support;
1818

1919
import org.springframework.amqp.core.Message;
20-
import org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException;
20+
import org.springframework.amqp.rabbit.support.ListenerExecutionFailedException;
2121

2222
import com.rabbitmq.client.Channel;
2323

@@ -26,6 +26,7 @@
2626
* Used for conversion errors when using manual acks.
2727
*
2828
* @author Gary Russell
29+
*
2930
* @since 5.1.3
3031
*
3132
*/

spring-integration-amqp/src/test/java/org/springframework/integration/amqp/dsl/AmqpTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import org.springframework.amqp.rabbit.junit.RabbitAvailableCondition;
3737
import org.springframework.amqp.rabbit.listener.DirectMessageListenerContainer;
3838
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
39-
import org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException;
39+
import org.springframework.amqp.rabbit.support.ListenerExecutionFailedException;
4040
import org.springframework.amqp.support.converter.MessageConversionException;
4141
import org.springframework.amqp.support.converter.SimpleMessageConverter;
4242
import org.springframework.beans.factory.annotation.Autowired;
@@ -168,7 +168,7 @@ public void testTemplateChannelTransacted() {
168168
private MessageChannel amqpAsyncOutboundFlowInput;
169169

170170
@Test
171-
public void testAmqpAsyncOutboundGatewayFlow() throws Exception {
171+
public void testAmqpAsyncOutboundGatewayFlow() {
172172
QueueChannel replyChannel = new QueueChannel();
173173
this.amqpAsyncOutboundFlowInput.send(MessageBuilder.withPayload("async gateway")
174174
.setReplyChannel(replyChannel)

spring-integration-amqp/src/test/java/org/springframework/integration/amqp/inbound/InboundEndpointTests.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer;
4343
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
4444
import org.springframework.amqp.rabbit.listener.api.ChannelAwareMessageListener;
45-
import org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException;
45+
import org.springframework.amqp.rabbit.support.ListenerExecutionFailedException;
4646
import org.springframework.amqp.support.AmqpHeaders;
4747
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
4848
import org.springframework.amqp.support.converter.MessageConversionException;
@@ -100,7 +100,7 @@ public void testInt2809JavaTypePropertiesToAmqp() throws Exception {
100100
Object payload = new Foo("bar1");
101101

102102
Transformer objectToJsonTransformer = new ObjectToJsonTransformer();
103-
Message<?> jsonMessage = objectToJsonTransformer.transform(new GenericMessage<Object>(payload));
103+
Message<?> jsonMessage = objectToJsonTransformer.transform(new GenericMessage<>(payload));
104104

105105
MessageProperties amqpMessageProperties = new MessageProperties();
106106
amqpMessageProperties.setDeliveryTag(123L);
@@ -343,7 +343,8 @@ public void testRetryWithinOnMessageAdapter() throws Exception {
343343
assertThat(payload.getMessage()).contains("Dispatcher has no");
344344
assertThat(StaticMessageHeaderAccessor.getDeliveryAttempt(payload.getFailedMessage()).get()).isEqualTo(3);
345345
org.springframework.amqp.core.Message amqpMessage = errorMessage.getHeaders()
346-
.get(AmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_MESSAGE, org.springframework.amqp.core.Message.class);
346+
.get(AmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_MESSAGE,
347+
org.springframework.amqp.core.Message.class);
347348
assertThat(amqpMessage).isNotNull();
348349
assertThat(errors.receive(0)).isNull();
349350
}
@@ -370,7 +371,8 @@ public void testRetryWithinOnMessageGateway() throws Exception {
370371
assertThat(payload.getMessage()).contains("Dispatcher has no");
371372
assertThat(StaticMessageHeaderAccessor.getDeliveryAttempt(payload.getFailedMessage()).get()).isEqualTo(3);
372373
org.springframework.amqp.core.Message amqpMessage = errorMessage.getHeaders()
373-
.get(AmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_MESSAGE, org.springframework.amqp.core.Message.class);
374+
.get(AmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_MESSAGE,
375+
org.springframework.amqp.core.Message.class);
374376
assertThat(amqpMessage).isNotNull();
375377
assertThat(errors.receive(0)).isNull();
376378
}

0 commit comments

Comments
 (0)