-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Description
geert opened SPR-12483 and commented
Default converters cannot handle EnumSets. A form object with a EnumSet property throws an exception.
Failed to convert property value of type java.lang.String[] to required type java.util.EnumSet for property typeProjecten; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String[] to type @org
.hibernate.validator.constraints.NotEmpty java.util.EnumSet<@org
.hibernate.validator.constraints.NotEmpty nl.amc.mb.amcliteratuur.domain.TypeProject> for value {CAT, CONFERENCE}; nested exception is java.lang.IllegalArgumentException: Could not instantiate Collection type: java.util.EnumSet
This issue has been resolved in Spring DATA MongoDB (https://jira.spring.io/browse/DATAMONGO-833). It would be nice if it was solved in Spring Framework itself
Affects: 3.2.12
Issue Links:
- CollectionFactory API is not type-safe [SPR-12537] #17142 CollectionFactory API is not type-safe ("is depended on by")
- DATACMNS-613 Remove custom CollectionFactory once we migrate to Spring 4.1.x
- CollectionFactory should create empty EnumSets and EnumMaps [SPR-12533] #17138 CollectionFactory should create empty EnumSets and EnumMaps