diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java index e3dddf62db2..696e3088583 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java @@ -722,7 +722,7 @@ class CustomEditorTests { @Test void testCustomDateEditor() { - CustomDateEditor editor = new CustomDateEditor(null, false); + CustomDateEditor editor = new CustomDateEditor(new SimpleDateFormat("MM/dd/yyyy"), false); editor.setValue(null); assertThat(editor.getValue()).isNull(); assertThat(editor.getAsText()).isEmpty(); @@ -730,7 +730,7 @@ class CustomEditorTests { @Test void testCustomDateEditorWithEmptyAsNull() { - CustomDateEditor editor = new CustomDateEditor(null, true); + CustomDateEditor editor = new CustomDateEditor(new SimpleDateFormat("MM/dd/yyyy"), true); editor.setValue(null); assertThat(editor.getValue()).isNull(); assertThat(editor.getAsText()).isEmpty();