Description
David Haraburda opened SPR-12050 and commented
Given an Enum that implements SomeInterface, GenericConversionService will attempt to use the default StringToEnumConverterFactory, even if a custom converter for String -> SomeInterface is registered. This problem was reported and described in #14326 but wasn't actually fixed. Instead, the "opposite" case of SomeInterface -> String conversion which also wasn't working was fixed.
The original test case attached to #14326 fails on 4.0.6; I have also attached to this JIRA an updated test case based on the original that in addition to demonstrating the described failure also shows a failure when a converter is registered for the base interface of some interface that is implemented by an Enum (i.e., SomeInterface extends SomeBaseInterface).
Affects: 4.0.6
Attachments:
- spring_conversion_service_tests.zip (15.11 kB)
Issue Links:
- Support conversion from Enum Interface [SPR-9692] #14326 Support conversion from Enum Interface