-
Notifications
You must be signed in to change notification settings - Fork 40.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0.0.RC2 fails to bind ConfigurationProperties of type List<Class<? extends Throwable>> #12166
Comments
Here's a small addition to @Test
public void loadWhenBindingToListOfGenericClassShouldBind() {
SimpleTypeConverter simpleTypeConverter = new SimpleTypeConverter();
this.context.getBeanFactory().copyRegisteredEditorsTo(simpleTypeConverter);
Class<?> converted = simpleTypeConverter
.convertIfNecessary("java.lang.RuntimeException", Class.class);
assertThat(converted).isEqualTo(RuntimeException.class);
load(ListOfGenericClassProperties.class, "test.list=java.lang.RuntimeException");
ListOfGenericClassProperties bean = this.context
.getBean(ListOfGenericClassProperties.class);
assertThat(bean.getList()).containsExactly(RuntimeException.class);
} |
OK, I think I know what's going on. In RC1 we had a PropertyEditorConverter class that would bridge the two type conversion worlds. In RC2 we dropped that in favor of calling When we call The logic is:
Conversion fails. |
I think we'll need to make |
@larsgrefer You you try the latest SNAPSHOT if you get a chance to see if this is now fixed for you? |
@philwebb Sure. The current |
@larsgrefer Great news! Thanks for reporting this before we went GA. |
Spring Boot 2.0.0.RC2 fails to bind a configuration property of type
List<Class<? extends Throwable>>
.With 2.0.0.RC1 everything was working fine.
Working Unit test: https://github.com/persapiens/joinfaces/blob/0e7c5a02a28b9c0785cf350150b5b0c1e96c9b11/joinfaces-autoconfigure/src/test/java/org/joinfaces/autoconfigure/omnifaces/OmnifacesPropertiesIT.java#L51
Broken Unit test https://github.com/persapiens/joinfaces/blob/72d592897fb41efcc9e128500e77c77a072a49fb/joinfaces-autoconfigure/src/test/java/org/joinfaces/autoconfigure/omnifaces/OmnifacesPropertiesIT.java#L51
The text was updated successfully, but these errors were encountered: