Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "abstract type mapping" for deserialization from Map<ENUMTYPE,V> into EnumMap (and Set<ENUMTYPE> to EnumSet<EnumType>) #1883

Closed
cowtowncoder opened this issue Jan 11, 2018 · 1 comment
Labels
Milestone

Comments

@cowtowncoder
Copy link
Member

(see #1882 for background)

Currently Map type is mapped, during deserialization, into concrete type to use, default being LinkedHashMap. This works fine in general but in specific case of enum type being used for key, it seems useful to instead map it into EnumMap: this is more efficient type to use and likely what users would prefer (or at very least not mind).
Users may still specify more specific type, like concrete type, to avoid this mapping; it only applies to general references to Map type.

Since this does change observed behavior slightly, it needs to go in next minor or major release: given that 2.9 is the last minor release (very likely) from 2.x, this means 3.0.

@cowtowncoder cowtowncoder changed the title Add "abstract type mapping" for deserialization from Map<ENUMTYPE,V> into EnumMap Add "abstract type mapping" for deserialization from Map<ENUMTYPE,V> into EnumMap (and Set<ENUMTYPE> to EnumSet<EnumType>) Jan 25, 2018
@cowtowncoder
Copy link
Member Author

Note: this is potentially backwards-compatibility breaking change, since EnumMap and EnumSet can not contain nulls. Will consider that fine for 3.x, but need to keep in mind just inc ase.

@cowtowncoder cowtowncoder added this to the 3.0.0 milestone Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant