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
#17089 introduced conversion support for EnumSet and EnumMap in CollectionFactory; however, the newly introduced support contradicts the existing contract for the related methods by creating a copy of the supplied set or map, thereby potentially including elements in the returned collection when the returned collection should in fact be empty.
Deliverables
Refactor createApproximateCollection() so that it returns an emptyEnumSet.
Refactor createApproximateMap() so that it returns an emptyEnumMap.
Create empty EnumSets & EnumMaps in CollectionFactory
#17089 introduced automatic type conversion support for EnumSet and
EnumMap. However, the corresponding changes in CollectionFactory
contradict the existing contract for the "create approximate" methods
by creating a copy of the supplied set or map, thereby potentially
including elements in the returned collection when the returned
collection should in fact be empty.
This commit addresses this issue by ensuring that the collections
returned by createApproximateCollection() and createApproximateMap()
are always empty.
Furthermore, this commit improves the Javadoc throughout the
CollectionFactory class.
Sam Brannen opened SPR-12533 and commented
Status Quo
#17089 introduced conversion support for
EnumSet
andEnumMap
inCollectionFactory
; however, the newly introduced support contradicts the existing contract for the related methods by creating a copy of the supplied set or map, thereby potentially including elements in the returned collection when the returned collection should in fact be empty.Deliverables
createApproximateCollection()
so that it returns an emptyEnumSet
.createApproximateMap()
so that it returns an emptyEnumMap
.Affects: 4.1.3
Issue Links:
Referenced from: commits aec284a
The text was updated successfully, but these errors were encountered: