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
When resolving a parameterized map in ApiObjectField, the key and value classes are pulled from the parameterizedType actualTypeArguments array and then cast to Class<?>. If the key or value is also a ParameterizedType, then this cast fails. To do this properly, the returned type should be recursively walked until all ParameterizedType returns are resolved. Either that or punt and use the raw type.
Specifically, I have a field declared as:
Map<String, Set> map;
I should expect getFieldObject to either return ["Map", "String", "Set", "map"] or ["Map", "String", "Set", "map"](or, at worse: ["Map", "String", null, "map"])
Handling of generics is probably present elsewhere in the code and might be best handled by a utility method that returns a Class for a given Type.
The text was updated successfully, but these errors were encountered:
When resolving a parameterized map in ApiObjectField, the key and value classes are pulled from the parameterizedType actualTypeArguments array and then cast to Class<?>. If the key or value is also a ParameterizedType, then this cast fails. To do this properly, the returned type should be recursively walked until all ParameterizedType returns are resolved. Either that or punt and use the raw type.
Specifically, I have a field declared as:
Map<String, Set> map;
I should expect getFieldObject to either return ["Map", "String", "Set", "map"] or ["Map", "String", "Set", "map"](or, at worse: ["Map", "String", null, "map"])
Handling of generics is probably present elsewhere in the code and might be best handled by a utility method that returns a Class for a given Type.
The text was updated successfully, but these errors were encountered: