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
{{ message }}
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.
getParameters() is documented to throw MalformedParametersException in case there's something wrong with the parameter name declarations in the byte code. This is basically equivalent to not being able to lookup the names and thus I think ParameterNamesAnnotationIntrospector.findParameterName(…) should just return null.
I ran into this scenario with the Eclipse compiler generating some private static methods for lambda expressions, that didn't generate parameter names correctly, while the Maven compiler does correctly. As the MalformedParametersException is not handled by the introspector, my Jackson unmarshalling fails completely where it could just have ignored the method it failed to resolve the parameters for.
I am currently working around this issue by registering another module that checks for these special methods in an AnnotationIntrospector.hasIgnoreMarker(…) and look for the special method names the compiler uses.
The text was updated successfully, but these errors were encountered:
Hello Oliver,
thank you for reporting this issue with a detailed description.
I've submitted a pull request to fix it.
Also, this is a duplicate of #16 where there was some discussion about handling this in jackson-databind, but now I think it is rather simple to handle in parameter names module itself. @cowtowncoder, what do you think?
getParameters()
is documented to throwMalformedParametersException
in case there's something wrong with the parameter name declarations in the byte code. This is basically equivalent to not being able to lookup the names and thus I thinkParameterNamesAnnotationIntrospector.findParameterName(…)
should just returnnull
.I ran into this scenario with the Eclipse compiler generating some private static methods for lambda expressions, that didn't generate parameter names correctly, while the Maven compiler does correctly. As the
MalformedParametersException
is not handled by the introspector, my Jackson unmarshalling fails completely where it could just have ignored the method it failed to resolve the parameters for.I am currently working around this issue by registering another module that checks for these special methods in an
AnnotationIntrospector.hasIgnoreMarker(…)
and look for the special method names the compiler uses.The text was updated successfully, but these errors were encountered: