Merge pull request #50429 from igormukhin

* rabbitmq-empty-ssl-bundle:
  Treat empty RabbitMQ SSL bundle as unset

Closes gh-50429
This commit is contained in:
Stéphane Nicoll
2026-05-29 11:29:07 +02:00
2 changed files with 7 additions and 1 deletions
@@ -474,7 +474,7 @@ public class RabbitProperties {
* @see #getEnabled() ()
*/
public boolean determineEnabled() {
boolean defaultEnabled = Boolean.TRUE.equals(getEnabled()) || this.bundle != null;
boolean defaultEnabled = Boolean.TRUE.equals(getEnabled()) || StringUtils.hasText(this.bundle);
if (CollectionUtils.isEmpty(RabbitProperties.this.parsedAddresses)) {
return defaultEnabled;
}
@@ -335,6 +335,12 @@ class RabbitPropertiesTests {
assertThat(this.properties.getSsl().determineEnabled()).isTrue();
}
@Test
void determineSslEnabledIsFalseWhenBundleIsEmpty() {
this.properties.getSsl().setBundle("");
assertThat(this.properties.getSsl().determineEnabled()).isFalse();
}
@Test
void propertiesUseConsistentDefaultValues() {
ConnectionFactory connectionFactory = new ConnectionFactory();