mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
9a6c6b9ee6
Update StringToEnumConverterFactory to search superclasses until
Class.isEnum() returns true. This allows conversion when the
enum class is obtained from the enum value:
public static enum SubFoo {
BAR { String s() { return "x"; } };
abstract String s();
}
conversionService.convert("BAR", SubFoo.BAR.getClass())
This fix is particularly important when converting collections of
enums.
Issue: SPR-10329