JavaPackage#getPackageDependenciesFromSelf returns dependencies from both self AND subpackages #919
Closed
Description
In JavaPacakge
:
getPackageDependenciesFromSelf
collects packages of classes returned bygetClassDependenciesFromSelf
getClassDependenciesFromSelf
collects dependencies originating from classes returned bygetAllClasses
getAllClasses
collects classes from both the current package AND all subpackages (descendants)
This caught me by surprise - I expected getPackageDependenciesFromSelf
to only return the package dependencies originating from classes in the current package (i.e. excluding any subpackages).
At first glance it would seem that just replacing getAllClasses
with getClasses
in getClassDependenciesFrom/ToSelf
would make it match my expectation.
If this is a bug, I'd be happy to open a PR with a fix.
Metadata
Assignees
Labels
No labels