Exclude CustomNumberEditor and CustomBooleanEditor

Add `CustomNumberEditor` and `CustomBooleanEditor` to the editor
exclusions sine the regular `ConversionService` should be able to
handle them.

Closes gh-27829
pull/27832/head
Phillip Webb 3 years ago
parent 8db82f02fc
commit 211532f08d

@ -30,6 +30,8 @@ import java.util.function.Consumer;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.PropertyEditorRegistry;
import org.springframework.beans.SimpleTypeConverter;
import org.springframework.beans.propertyeditors.CustomBooleanEditor;
import org.springframework.beans.propertyeditors.CustomNumberEditor;
import org.springframework.beans.propertyeditors.FileEditor;
import org.springframework.boot.convert.ApplicationConversionService;
import org.springframework.core.ResolvableType;
@ -175,7 +177,9 @@ final class BindConverter {
private static final Set<Class<?>> EXCLUDED_EDITORS;
static {
Set<Class<?>> excluded = new HashSet<>();
excluded.add(FileEditor.class); // gh-12163
excluded.add(CustomNumberEditor.class);
excluded.add(CustomBooleanEditor.class);
excluded.add(FileEditor.class);
EXCLUDED_EDITORS = Collections.unmodifiableSet(excluded);
}

Loading…
Cancel
Save