Commit 405b9b7f authored by Stephane Nicoll's avatar Stephane Nicoll

Merge branch '2.2.x'

Closes gh-19693
parents 550e042f 3acf7b99
...@@ -123,7 +123,7 @@ class NoSuchBeanDefinitionFailureAnalyzer extends AbstractInjectionFailureAnalyz ...@@ -123,7 +123,7 @@ class NoSuchBeanDefinitionFailureAnalyzer extends AbstractInjectionFailureAnalyz
if (configurationProperties.isPresent()) { if (configurationProperties.isPresent()) {
if (KotlinDetector.isKotlinType(declaringClass) && !KotlinDetector.isKotlinReflectPresent()) { if (KotlinDetector.isKotlinType(declaringClass) && !KotlinDetector.isKotlinReflectPresent()) {
action = String.format( 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.", + "configuration property binding.",
action, ConstructorBinding.class.getSimpleName(), ConstructorBinding.class.getSimpleName(), action, ConstructorBinding.class.getSimpleName(), ConstructorBinding.class.getSimpleName(),
constructor.getName()); constructor.getName());
......
...@@ -31,7 +31,7 @@ class KotlinNoSuchBeanFailureAnalyzerNoKotlinReflectTests { ...@@ -31,7 +31,7 @@ class KotlinNoSuchBeanFailureAnalyzerNoKotlinReflectTests {
assertThat(analysis!!.getAction()).startsWith( assertThat(analysis!!.getAction()).startsWith(
java.lang.String.format("Consider defining a bean of type '%s' in your configuration.", String::class.java!!.getName())) 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( 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? { private fun createFailure(config: Class<*>, vararg environment: String): FatalBeanException? {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment