Improve TypeFactory.constructFromCanonical()
to work with `java.lang.reflect.Type.getTypeName()' format
#1768
Milestone
TypeFactory.constructFromCanonical()
to work with `java.lang.reflect.Type.getTypeName()' format
#1768
Java's Type#getTypeName() for parameterized types with multiple type parameters returns the inner types in a comma and space separated list. (e.g. "java.util.Map<java.lang.Integer, java.lang.Double>").
Attempting to construct the type using TypeFactory's constructFromCanonical will result in an exception as the inner tokens are not trimmed (although the top level String is). For the example above it would be
Since using Jackson's own JavaTypes to obtain the canonical form does not yield inner spaces, no error will occur for that scenario, hence I see this as a feature I'd like to have rather than a bug. This could be easily achieved if findClass trimmed the String it receives (or received an already trimmed token).
The text was updated successfully, but these errors were encountered: