-
Notifications
You must be signed in to change notification settings - Fork 99
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
Like List, initialize the HashMap as empty when class is generated using xsd #517
Comments
Hi @jobas2007 |
Maps can get really complicated to try to get correct marshal/unmarshal. A couple key features:
The scheme is more like this:
However, the above approach makes doing Maps with simple primitive K,V overly complex. Explosion looks like this NOTE: To get this actually correct, the Map would need to convert the to be a of all the various combination of <K,V> Map.Entry types, since Maps shouldn't have mismatched typing across all the contained Map.Entry.
|
with possibility of defining impl class and ignored fields
@jobas2007 : provided PR #518 for this in v4 branch |
Thanks for looking in this right away. |
It'll need backport then to v2.x branch but will be done with only new namespaces. |
with possibility of defining impl class and ignored fields
with possibility of defining impl class and ignored fields
The current xjc plugin initializes the list to empty when getter is called.
Firstly was trying to use HashMap in XSD and finally was able to achieve it, but the xjc plugin is yet to initialize it. More details are in stack overflow links https://stackoverflow.com/questions/78077708/using-hashmap-in-xsd.
Was advised by Laurent (contributor) to open a issue.
Appreciate quick resolution so that can use updated plugin before prod release. Thanks
The text was updated successfully, but these errors were encountered: