-
Notifications
You must be signed in to change notification settings - Fork 28
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
The format of the signature in the eu.fasten.core.data.JavaNode is very strange #248
Comments
Not sure if this issue still applies, but I think the |
There are two reasons for this 1) Unfortunately in some cases, JVM and Java code does not produce 1:1 methods. IIRC it was for generic types that JVM would generate synthetic methods. The only way that we could capture everything from bytecode was to include return types in the signature. 2) As Sebastian mentioned |
It looks like
method()/package.of.the.return.type/ReturnTypeName
while I would have expected something closer to what we usually see in Java like "some.package.MyClass.method()" or "some.package.MyClass#method()".That being said it feels wrong to store this full String instead of separated elements which are only merged when you call
getSignature()
for example. That way it's a lot easier to create whatever format you want and more importantly it reduces drastically the current huge duplication this storage cause in memory because then you can properly reuse the same String instance for the package (and even imagine a list of strings instead of a single String for the package to reduce even more the duplication), the class, the return types, etc.Regarding the return type, while it's definitely useful information for some use cases it's not part of the method signature (it's part of the declaration along with other erased stuff like the method parameters annotations and generics) and should probably be moved to the metadata to avoid polluting the signature and, worst, probably cause problems during stitching when you try to match an external callable from one package to an internal callable from another package during stitching for example when the return type slightly changes from one version to another of some dependency.
The text was updated successfully, but these errors were encountered: