Skip to content

Commit e7d9f19

Browse files
committed
Merge branch '3.4.x'
Closes gh-44438
2 parents 2ec99a7 + ea25734 commit e7d9f19

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ private static void setBackOffPolicy(RetryTopicConfigurationBuilder builder, Bac
238238

239239
static void applySslBundle(Map<String, Object> properties, SslBundle sslBundle) {
240240
if (sslBundle != null) {
241-
properties.put(SslConfigs.SSL_ENGINE_FACTORY_CLASS_CONFIG, SslBundleSslEngineFactory.class.getName());
241+
properties.put(SslConfigs.SSL_ENGINE_FACTORY_CLASS_CONFIG, SslBundleSslEngineFactory.class);
242242
properties.put(SslBundle.class.getName(), sslBundle);
243243
}
244244
}

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@ public Configuration getConsumer() {
216216
assertThat(context).hasSingleBean(KafkaConnectionDetails.class);
217217
DefaultKafkaConsumerFactory<?, ?> consumerFactory = context.getBean(DefaultKafkaConsumerFactory.class);
218218
Map<String, Object> configs = consumerFactory.getConfigurationProperties();
219-
assertThat(configs).containsEntry("ssl.engine.factory.class",
220-
"org.springframework.boot.autoconfigure.kafka.SslBundleSslEngineFactory");
219+
assertThat(configs).containsEntry("ssl.engine.factory.class", SslBundleSslEngineFactory.class);
221220
assertThat(configs).containsEntry("org.springframework.boot.ssl.SslBundle", sslBundle);
222221
});
223222
}
@@ -310,8 +309,7 @@ public Configuration getProducer() {
310309
assertThat(context).hasSingleBean(KafkaConnectionDetails.class);
311310
DefaultKafkaProducerFactory<?, ?> producerFactory = context.getBean(DefaultKafkaProducerFactory.class);
312311
Map<String, Object> configs = producerFactory.getConfigurationProperties();
313-
assertThat(configs).containsEntry("ssl.engine.factory.class",
314-
"org.springframework.boot.autoconfigure.kafka.SslBundleSslEngineFactory");
312+
assertThat(configs).containsEntry("ssl.engine.factory.class", SslBundleSslEngineFactory.class);
315313
assertThat(configs).containsEntry("org.springframework.boot.ssl.SslBundle", sslBundle);
316314
});
317315
}
@@ -394,8 +392,7 @@ public Configuration getAdmin() {
394392
assertThat(context).hasSingleBean(KafkaConnectionDetails.class);
395393
KafkaAdmin admin = context.getBean(KafkaAdmin.class);
396394
Map<String, Object> configs = admin.getConfigurationProperties();
397-
assertThat(configs).containsEntry("ssl.engine.factory.class",
398-
"org.springframework.boot.autoconfigure.kafka.SslBundleSslEngineFactory");
395+
assertThat(configs).containsEntry("ssl.engine.factory.class", SslBundleSslEngineFactory.class);
399396
assertThat(configs).containsEntry("org.springframework.boot.ssl.SslBundle", sslBundle);
400397
});
401398
}
@@ -490,8 +487,7 @@ public Configuration getStreams() {
490487
.getBean(KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME,
491488
KafkaStreamsConfiguration.class)
492489
.asProperties();
493-
assertThat(configs).containsEntry("ssl.engine.factory.class",
494-
"org.springframework.boot.autoconfigure.kafka.SslBundleSslEngineFactory");
490+
assertThat(configs).containsEntry("ssl.engine.factory.class", SslBundleSslEngineFactory.class);
495491
assertThat(configs).containsEntry("org.springframework.boot.ssl.SslBundle", sslBundle);
496492
});
497493
}

0 commit comments

Comments
 (0)