Polishing

This commit is contained in:
Juergen Hoeller
2024-03-04 22:48:52 +01:00
parent 24759a75f4
commit e9110c0729
21 changed files with 97 additions and 124 deletions

View File

@@ -38,7 +38,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class DataBinderConstructTests {
@Test
void dataClassBinding() {
MapValueResolver valueResolver = new MapValueResolver(Map.of("param1", "value1", "param2", "true"));
@@ -78,7 +77,7 @@ class DataBinderConstructTests {
assertThat(bindingResult.getFieldValue("param3")).isNull();
}
@Test // gh-31821
@Test // gh-31821
void dataClassBindingWithNestedOptionalParameterWithMissingParameter() {
MapValueResolver valueResolver = new MapValueResolver(Map.of("param1", "value1"));
DataBinder binder = initDataBinder(NestedDataClass.class);

View File

@@ -2055,7 +2055,7 @@ class DataBinderTests {
.withMessageContaining("DataBinder is already initialized - call setAutoGrowCollectionLimit before other configuration methods");
}
@Test // SPR-15009
@Test // SPR-15009
void setCustomMessageCodesResolverBeforeInitializeBindingResultForBeanPropertyAccess() {
TestBean testBean = new TestBean();
DataBinder binder = new DataBinder(testBean, "testBean");
@@ -2072,7 +2072,7 @@ class DataBinderTests {
assertThat(((BeanWrapper) binder.getInternalBindingResult().getPropertyAccessor()).getAutoGrowCollectionLimit()).isEqualTo(512);
}
@Test // SPR-15009
@Test // SPR-15009
void setCustomMessageCodesResolverBeforeInitializeBindingResultForDirectFieldAccess() {
TestBean testBean = new TestBean();
DataBinder binder = new DataBinder(testBean, "testBean");
@@ -2126,7 +2126,7 @@ class DataBinderTests {
.withMessageContaining("DataBinder is already initialized with MessageCodesResolver");
}
@Test // gh-24347
@Test // gh-24347
void overrideBindingResultType() {
TestBean testBean = new TestBean();
DataBinder binder = new DataBinder(testBean, "testBean");

View File

@@ -83,8 +83,7 @@ class MethodValidationProxyTests {
context.close();
}
@Test // gh-29782
@SuppressWarnings("unchecked")
@Test // gh-29782
public void testMethodValidationPostProcessorForInterfaceOnlyProxy() {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
context.register(MethodValidationPostProcessor.class);