You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MetaDataDrivenConversionService registers the EnumStringConverter with the delegate. However, the adapter created by Spring is then typed to java.lang.Enum, not to the correct enum.
For enum attributes we must use the concrete enum class when registering our converters.
The text was updated successfully, but these errors were encountered:
`Enum` properties always use an `AttributeConverter` and this is always passed to the parent conversion service. The parent conversion service however creates an adapter on the passed source type. Originally we passed `java.lang.Enum` here, leading to a scenario in which the parent decided to not be able to convert a concrete enum instance (and rightfully so). The solution in this commit is to pass the concrete field type if it is an enum.
The conversion failed only for constructor calls.
This fixes#2213.
`Enum` properties always use an `AttributeConverter` and this is always passed to the parent conversion service. The parent conversion service however creates an adapter on the passed source type. Originally we passed `java.lang.Enum` here, leading to a scenario in which the parent decided to not be able to convert a concrete enum instance (and rightfully so). The solution in this commit is to pass the concrete field type if it is an enum.
The conversion failed only for constructor calls.
This fixes#2213.
The
MetaDataDrivenConversionService
registers theEnumStringConverter
with the delegate. However, the adapter created by Spring is then typed tojava.lang.Enum
, not to the correct enum.For enum attributes we must use the concrete enum class when registering our converters.
The text was updated successfully, but these errors were encountered: