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
They are not implemented as LinkedHashSet, and so do not retain insertion order like conjure'd set<> fields do.
They are not immutable copies (!).
They are slightly more difficult to construct (eg MyUnion.fooSet(...) the arg must be a set).
Regular conjure objects are deserialized via their builder, which initializes sets as LinkedHashSet, copies the incoming value, and then on build stores an immutable set.
I would guess this behavior extends to Maps as union members also.
What did you want to happen?
Maintain insertion order like conjure fields. Probably this arg needs a @JsonDeserialize(as = LinkedHashSet.class).
Do not store this.value directly, make a copy.
Have additional Union creators that take Iterable like regular fields.
The text was updated successfully, but these errors were encountered:
What happened?
Union values that are sets have a few quirks. eg:
They are not implemented as LinkedHashSet, and so do not retain insertion order like conjure'd
set<>
fields do.They are not immutable copies (!).
They are slightly more difficult to construct (eg
MyUnion.fooSet(...)
the arg must be a set).The generated
FooSetWrapper
:Regular conjure objects are deserialized via their builder, which initializes sets as
LinkedHashSet
, copies the incoming value, and then on build stores an immutable set.I would guess this behavior extends to Maps as union members also.
What did you want to happen?
@JsonDeserialize(as = LinkedHashSet.class)
.The text was updated successfully, but these errors were encountered: