From 852659684b65ef4fae11d61d825b340d868e2712 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Mon, 13 Jan 2020 18:10:12 +0100 Subject: [PATCH] Fix typo in NoSuchBeanDefinitionFailureAnalyzer exception See gh-19690 --- .../analyzer/NoSuchBeanDefinitionFailureAnalyzer.java | 2 +- .../KotlinNoSuchBeanFailureAnalyzerNoKotlinReflectTests.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzer.java index df4ede6efd..369fee65d2 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzer.java @@ -123,7 +123,7 @@ class NoSuchBeanDefinitionFailureAnalyzer extends AbstractInjectionFailureAnalyz if (configurationProperties.isPresent()) { if (KotlinDetector.isKotlinType(declaringClass) && !KotlinDetector.isKotlinReflectPresent()) { action = String.format( - "%s%nConsider adding a dependency on kotlin-reflect so that the contructor used for @%s can be located. Also, ensure that @%s is present on '%s' if you intended to use constructor-based " + "%s%nConsider adding a dependency on kotlin-reflect so that the constructor used for @%s can be located. Also, ensure that @%s is present on '%s' if you intended to use constructor-based " + "configuration property binding.", action, ConstructorBinding.class.getSimpleName(), ConstructorBinding.class.getSimpleName(), constructor.getName()); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/kotlin/org/springframework/boot/autoconfigure/diagnostics/analyzer/KotlinNoSuchBeanFailureAnalyzerNoKotlinReflectTests.kt b/spring-boot-project/spring-boot-autoconfigure/src/test/kotlin/org/springframework/boot/autoconfigure/diagnostics/analyzer/KotlinNoSuchBeanFailureAnalyzerNoKotlinReflectTests.kt index e112ffa07b..eaa97930ec 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/kotlin/org/springframework/boot/autoconfigure/diagnostics/analyzer/KotlinNoSuchBeanFailureAnalyzerNoKotlinReflectTests.kt +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/kotlin/org/springframework/boot/autoconfigure/diagnostics/analyzer/KotlinNoSuchBeanFailureAnalyzerNoKotlinReflectTests.kt @@ -31,7 +31,7 @@ class KotlinNoSuchBeanFailureAnalyzerNoKotlinReflectTests { assertThat(analysis!!.getAction()).startsWith( java.lang.String.format("Consider defining a bean of type '%s' in your configuration.", String::class.java!!.getName())) assertThat(analysis!!.getAction()).contains(java.lang.String.format( - "Consider adding a dependency on kotlin-reflect so that the contructor used for @ConstructorBinding can be located. Also, ensure that @ConstructorBinding is present on '%s' ", ConstructorBoundProperties::class.java!!.getName())) + "Consider adding a dependency on kotlin-reflect so that the constructor used for @ConstructorBinding can be located. Also, ensure that @ConstructorBinding is present on '%s' ", ConstructorBoundProperties::class.java!!.getName())) } private fun createFailure(config: Class<*>, vararg environment: String): FatalBeanException? {