TypeFactory.constructFromCanonical()
throws NPE for Unparameterized generic canonical strings
#1941
Milestone
TypeFactory.constructFromCanonical()
throws NPE for Unparameterized generic canonical strings
#1941
When
TypeFactory.constructFromCanonical(returnType)
is used in2.6.1
, thereturnType
string for generic types is not expected to have parameterized type information. For example, the following code runs fine on 2.6.1:But in version
2.8.7
, the same code gives aNullPointerException
with the stack trace:But if the
returnType
string is passed with the generic type information, even if it is passed asObject
, ie,returnType = "java.util.List<java.lang.Object>";
, it works fine.I have 2 questions, is there a way to make this change backward compatible? If not, how can I work around this? PS: The workaround given by Tatu in the mailing list is not clear to me, if someone can give me an example, it'd be great help. Thanks!
Link to google groups thread.
The text was updated successfully, but these errors were encountered: