|
|
|
@ -138,6 +138,21 @@ public class PropertySourcesPropertyValuesTests {
|
|
|
|
|
assertEquals("bar", target.getName());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testPlaceholdersErrorInNonEnumerable() {
|
|
|
|
|
TestBean target = new TestBean();
|
|
|
|
|
DataBinder binder = new DataBinder(target);
|
|
|
|
|
this.propertySources.addFirst(new PropertySource<Object>("application", "STUFF") {
|
|
|
|
|
@Override
|
|
|
|
|
public Object getProperty(String name) {
|
|
|
|
|
return new Object();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
binder.bind(new PropertySourcesPropertyValues(this.propertySources, null,
|
|
|
|
|
Collections.singleton("name")));
|
|
|
|
|
assertEquals(null, target.getName());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class TestBean {
|
|
|
|
|
private String name;
|
|
|
|
|
|
|
|
|
|