New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly parse method signatures with generic types #669
Conversation
Currently, the implementation assumes the signature will be of the format `(Ljava/lang/Object,Ljava/lang/Object)`, using a comma `,` separator. This is not the case for compiled classes. Compiled signatures use a semicolon `;` as the separator as described in [JVMS 4.2](https://docs.oracle.com/javase/specs/jvms/se17/html/jvms-4.html#jvms-ParameterDescriptor). This commit delegates the `SpotBugs'` signature parser to ensure the parser expects the format it is to be provided & reduces the maintenance overhead here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great PR.
argumentsTypes = paramAndReturn[0].split(","); | ||
|
||
returnType = paramAndReturn[1]; | ||
GenericSignatureParser delegate = new GenericSignatureParser(signature); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent fix ! I am also all about code reuse. 👌
Hi there,
Is the fix release with version 1.12.0 or coming later? Regards, R4FT3R |
I'm also still getting this error so definitely not fixed in 1.12.0.
|
Same issue, using 1.12.0 |
Same here. Doesn't seem to be fixed in 1.12.0. |
Can someone that is still facing this create a new issue with a minimum reproducible example? You will likely get more traction that way. |
Created #724 Same for me, it fails on return value of method: Try that simple class:
|
Currently, the implementation assumes the signature will be of the format
(Ljava/lang/Object,Ljava/lang/Object)
, using a comma,
separator.This is not the case for compiled classes. Compiled signatures use a
semicolon
;
as the separator as described in JVMS 4.2.This commit delegates the
SpotBugs'
signature parser to ensure the parserexpects the format it is to be provided & reduces the maintenance overhead here.
Ref #668