Skip to content
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

[java] Resolve External Non-JDK Types with Type Arguments #4527

Merged

Conversation

DavidBakerEffendi
Copy link
Collaborator

It's been known that certain types return as ANY when it's an external type with type arguments. However, the type would resolve when type arguments are removed.

This PR detects if the type to be resolved is a ClassOrInterfaceType, and if so, will only pass the type name to the type resolver, and resolve the type arguments separately. The type arguments are then placed in the fullName if keepFullNames is enabled.

It's been known that certain types return as `ANY` when it's an external type with type arguments. However, the type would resolve when type arguments are removed.

This PR detects if the type to be resolved is a `ClassOrInterfaceType`, and if so, will only pass the type name to the type resolver, and resolve the type arguments separately. The type arguments are then placed in the `fullName` if `keepFullNames` is enabled.
@DavidBakerEffendi DavidBakerEffendi merged commit 2287248 into master May 2, 2024
5 checks passed
@DavidBakerEffendi DavidBakerEffendi deleted the dave/java/resolve-types-with-type-arguments branch May 2, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java Relates to javasrc2cpg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants