Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 the original author or authors.
* Copyright 2012-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -233,6 +233,9 @@ public void setAddresses(List<String> addresses) {
}

private List<Address> parseAddresses(List<String> addresses) {
if (addresses == null) {
return null;
}
List<Address> parsedAddresses = new ArrayList<>();
for (String address : addresses) {
parsedAddresses.add(new Address(address, Optional.ofNullable(getSsl().getEnabled()).orElse(false)));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 the original author or authors.
* Copyright 2012-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,6 +25,7 @@
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
import org.springframework.amqp.rabbit.listener.DirectMessageListenerContainer;
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
import org.springframework.beans.BeanUtils;
import org.springframework.boot.context.properties.source.InvalidConfigurationPropertyValueException;

import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -38,6 +39,7 @@
* @author Stephane Nicoll
* @author Rafael Carvalho
* @author Scott Frederick
* @author Yanming Zhou
*/
class RabbitPropertiesTests {

Expand Down Expand Up @@ -381,4 +383,11 @@ void hostPropertyMustBeSingleHost() {
.withMessageContaining("spring.rabbitmq.host");
}

@Test
void isSafeForCopyProperties() {
this.properties.setHost("my-rmq-host.net");
RabbitProperties target = new RabbitProperties();
BeanUtils.copyProperties(this.properties, target);
}

}
Loading