From 453002b77bb4fb349d92cbee430cd8666b4baa75 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Wed, 26 Feb 2025 10:46:12 +0100 Subject: [PATCH] Add class of SslBundleSslEngineFactory to Kafka config map Closes gh-44414 --- .../boot/autoconfigure/kafka/KafkaProperties.java | 4 ++-- .../boot/autoconfigure/kafka/KafkaPropertiesTests.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java index 7352d8dfe24..ea8ebdf64d2 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java @@ -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. @@ -1455,7 +1455,7 @@ public class KafkaProperties { private Map buildPropertiesForSslBundle(SslBundles sslBundles, String name) { Properties properties = new Properties(); - properties.in(SslConfigs.SSL_ENGINE_FACTORY_CLASS_CONFIG).accept(SslBundleSslEngineFactory.class.getName()); + properties.in(SslConfigs.SSL_ENGINE_FACTORY_CLASS_CONFIG).accept(SslBundleSslEngineFactory.class); properties.in(SslBundle.class.getName()).accept(sslBundles.getBundle(name)); return properties; } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaPropertiesTests.java index 08fb63213ae..808bb4ba270 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaPropertiesTests.java @@ -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. @@ -108,7 +108,7 @@ class KafkaPropertiesTests { Map consumerProperties = properties .buildConsumerProperties(new DefaultSslBundleRegistry("myBundle", this.sslBundle)); assertThat(consumerProperties).containsEntry(SslConfigs.SSL_ENGINE_FACTORY_CLASS_CONFIG, - SslBundleSslEngineFactory.class.getName()); + SslBundleSslEngineFactory.class); } @Test