Fast, portable and reliable dependency analysis for any codebase. Supports license & vulnerability scanning for large monoliths. Language-agnostic; integrates with 20+ build systems.
It was discovered that the jar callgraph logic doesn’t account for creating all the appropriate edges for interfaces. Looking at the dependency mvn+com.squareup.okio_okio$1.15.0 we can see where our current jar callgraph logic fails to create the edges for interfaces.
Previously, we only had an edge like: M:okio.Buffer:writeAll(okio.Source) (I)okio.Source:read(okio.Buffer,long)
for interface method calls. Because we are calling an interface method, it is also possible to call of the classes that implement the interface depending on implementation. These are the newly added edges after the update.
[x] I added tests for this PR's change (or explained in the PR description why tests don't make sense).
[x] If this PR introduced a user-visible change, I added documentation into docs/.
[x] If this PR added docs, I added links as appropriate to the user manual's ToC in docs/README.ms and gave consideration to how discoverable or not my documentation is.
[x] If this change is externally visible, I updated Changelog.md. If this PR did not mark a release, I added my changes into an # Unreleased section at the top.
[x] If I made changes to .fossa.yml or fossa-deps.{json.yml}, I updated docs/references/files/*.schema.json AND I have updated example files used by fossa init command. You may also need to update these if you have added/removed new dependency type (e.g. pip) or analysis target type (e.g. poetry).
[x] If I made changes to a subcommand's options, I updated docs/references/subcommands/<subcommand>.md.
Overview
It was discovered that the jar callgraph logic doesn’t account for creating all the appropriate edges for interfaces. Looking at the dependency mvn+com.squareup.okio_okio$1.15.0 we can see where our current jar callgraph logic fails to create the edges for interfaces.
Acceptance criteria
Properly create edges for interfaces
Update all code paths that use jar-callgraph.jar
jar-callgraph
fossa-cli
core
Testing plan
Manual testing plan:
cd scripts
java -jar jar-callgraph-1.0.2.jar /path/to/example/jar
Look at the output and see that we now edges for:
Makes edges for interface methods and the classes that implement them
Previously, we only had an edge like:
M:okio.Buffer:writeAll(okio.Source) (I)okio.Source:read(okio.Buffer,long)
for interface method calls. Because we are calling an interface method, it is also possible to call of the classes that implement the interface depending on implementation. These are the newly added edges after the update.Risks
Metrics
References
Checklist
docs/
.docs/README.ms
and gave consideration to how discoverable or not my documentation is.Changelog.md
. If this PR did not mark a release, I added my changes into an# Unreleased
section at the top..fossa.yml
orfossa-deps.{json.yml}
, I updateddocs/references/files/*.schema.json
AND I have updated example files used byfossa init
command. You may also need to update these if you have added/removed new dependency type (e.g.pip
) or analysis target type (e.g.poetry
).docs/references/subcommands/<subcommand>.md
.