bindToCollectionWhenNonKnownIndexedChildNotBoundThrowsException() — spring-boot Function Reference
Architecture documentation for the bindToCollectionWhenNonKnownIndexedChildNotBoundThrowsException() function in CollectionBinderTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD b7bb0798_b77f_7026_23ab_08fdd99ca936["bindToCollectionWhenNonKnownIndexedChildNotBoundThrowsException()"] dec6e978_683d_a8e4_7ae5_e3e729d3253e["MockConfigurationPropertySource()"] b7bb0798_b77f_7026_23ab_08fdd99ca936 -->|calls| dec6e978_683d_a8e4_7ae5_e3e729d3253e 725e97d2_341b_6665_84bc_9206c7185c54["put()"] b7bb0798_b77f_7026_23ab_08fdd99ca936 -->|calls| 725e97d2_341b_6665_84bc_9206c7185c54 7437ce23_cb84_88cd_05ea_0748b72957a1["getName()"] b7bb0798_b77f_7026_23ab_08fdd99ca936 -->|calls| 7437ce23_cb84_88cd_05ea_0748b72957a1 b36de6d8_b985_12e4_b731_db390fd85040["getValue()"] b7bb0798_b77f_7026_23ab_08fdd99ca936 -->|calls| b36de6d8_b985_12e4_b731_db390fd85040 style b7bb0798_b77f_7026_23ab_08fdd99ca936 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java lines 132–152
@Test
void bindToCollectionWhenNonKnownIndexedChildNotBoundThrowsException() {
// gh-45994
MockConfigurationPropertySource source = new MockConfigurationPropertySource();
source.put("foo[0].first", "Spring");
source.put("foo[0].last", "Boot");
source.put("foo[1].missing", "bad");
this.sources.add(source);
assertThatExceptionOfType(BindException.class)
.isThrownBy(() -> this.binder.bind("foo", Bindable.listOf(Name.class)))
.satisfies((ex) -> {
Throwable cause = ex.getCause();
assertThat(cause).isNotNull();
Set<ConfigurationProperty> unbound = ((UnboundConfigurationPropertiesException) cause)
.getUnboundProperties();
assertThat(unbound).singleElement().satisfies((property) -> {
assertThat(property.getName()).hasToString("foo[1].missing");
assertThat(property.getValue()).isEqualTo("bad");
});
});
}
Domain
Subdomains
Source
Frequently Asked Questions
What does bindToCollectionWhenNonKnownIndexedChildNotBoundThrowsException() do?
bindToCollectionWhenNonKnownIndexedChildNotBoundThrowsException() is a function in the spring-boot codebase.
What does bindToCollectionWhenNonKnownIndexedChildNotBoundThrowsException() call?
bindToCollectionWhenNonKnownIndexedChildNotBoundThrowsException() calls 4 function(s): MockConfigurationPropertySource, getName, getValue, put.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free