I noticed NewMap and NewList types in the <actions> tag for XML services (common-types-3.xsd#L75)
I’m trying to understand their actual use cases. I couldn’t find any implementation that handles them — I checked basicConvert and MClassLoader.commonJavaClassesMap but didn’t find any related logic.
Could someone please shed light on the intended use cases for NewMap and NewList in service actions?
However, I think that you are right that, in the code, the NewMap and NewList types are not implemented. I assume these types are ignored and the implicit groovy compilation does the type casting as needed.
If we’re already using the from attribute to initialize a map or list (e.g., [:] or []), there’s no need to specify the typeattribute explicitly — Groovy handles type inference implicitly.
So yes, we can safely remove type="NewMap" and type="NewList", as there is no defined handling for these types and they are not implemented in the code.