multilang-depends / depends

Depends is a fast, comprehensive code dependency analysis tool
MIT License
195 stars 54 forks source link

fix NullPointerException in DependencyGenerator #47

Closed jlefever closed 1 year ago

jlefever commented 1 year ago

When using the --detail flag, depends will sometimes crash with a NullPointerException. This is caused by an assumption in the buildDescription method of the DependencyGenerator class that every toEntity is at or below the file level. However, sometimes a toEntity is above the file level (e.g. a Java package will not have a file ancestor).

I can't promise that this is the only location where this assumption is made.

gangz commented 1 year ago

Merged. Thanks for your contribution!