diff --git a/spring-amqp-parent/pom.xml b/spring-amqp-parent/pom.xml
index 9e475afb..6cb950ed 100644
--- a/spring-amqp-parent/pom.xml
+++ b/spring-amqp-parent/pom.xml
@@ -17,7 +17,7 @@
1.8.4
1.4.3
1.5.3
- 2.3.1
+ 2.5.0
3.0.5.RELEASE
diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/DefaultMessagePropertiesConverter.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/DefaultMessagePropertiesConverter.java
index 58099231..3c4b46bd 100644
--- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/DefaultMessagePropertiesConverter.java
+++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/DefaultMessagePropertiesConverter.java
@@ -92,26 +92,26 @@ public class DefaultMessagePropertiesConverter implements MessagePropertiesConve
}
public BasicProperties fromMessageProperties(final MessageProperties source, final String charset) {
- BasicProperties target = new BasicProperties();
- target.setHeaders(this.convertHeadersIfNecessary(source.getHeaders()));
- target.setTimestamp(source.getTimestamp());
- target.setMessageId(source.getMessageId());
- target.setUserId(source.getUserId());
- target.setAppId(source.getAppId());
- target.setClusterId(source.getClusterId());
- target.setType(source.getType());
+ BasicProperties.Builder target = new BasicProperties.Builder();
+ target.headers(this.convertHeadersIfNecessary(source.getHeaders()));
+ target.timestamp(source.getTimestamp());
+ target.messageId(source.getMessageId());
+ target.userId(source.getUserId());
+ target.appId(source.getAppId());
+ target.clusterId(source.getClusterId());
+ target.type(source.getType());
MessageDeliveryMode deliveryMode = source.getDeliveryMode();
if (deliveryMode != null) {
- target.setDeliveryMode(MessageDeliveryMode.toInt(deliveryMode));
+ target.deliveryMode(MessageDeliveryMode.toInt(deliveryMode));
}
- target.setExpiration(source.getExpiration());
- target.setPriority(source.getPriority());
- target.setContentType(source.getContentType());
- target.setContentEncoding(source.getContentEncoding());
+ target.expiration(source.getExpiration());
+ target.priority(source.getPriority());
+ target.contentType(source.getContentType());
+ target.contentEncoding(source.getContentEncoding());
byte[] correlationId = source.getCorrelationId();
if (correlationId != null && correlationId.length > 0) {
try {
- target.setCorrelationId(new String(correlationId, charset));
+ target.correlationId(new String(correlationId, charset));
}
catch (UnsupportedEncodingException ex) {
throw new AmqpUnsupportedEncodingException(ex);
@@ -119,9 +119,9 @@ public class DefaultMessagePropertiesConverter implements MessagePropertiesConve
}
Address replyTo = source.getReplyTo();
if (replyTo != null) {
- target.setReplyTo(replyTo.toString());
+ target.replyTo(replyTo.toString());
}
- return target;
+ return target.build();
}
private Map convertHeadersIfNecessary(Map headers) {
diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/MulticastMain.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/MulticastMain.java
index a201119c..fbc8c06b 100644
--- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/MulticastMain.java
+++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/MulticastMain.java
@@ -250,7 +250,7 @@ public class MulticastMain {
this.message = new byte[minMsgSize];
}
- public void handleBasicReturn(int replyCode, String replyText, String exchange, String routingKey,
+ public void handleReturn(int replyCode, String replyText, String exchange, String routingKey,
AMQP.BasicProperties properties, byte[] body) throws IOException {
logBasicReturn();
}