sonatype / ossindex-public

Sonatype OSS Index - Public
Apache License 2.0
6 stars 9 forks source link

Update getExternalReferences() to return an empty list instead of null #30

Closed ndonewar closed 2 years ago

ndonewar commented 2 years ago

This PR is a fix for #29. While the data should contain at least one reference, and the server-side API will always return an empty list if there are no references (internal code), this change updates getExternalReferences() to return an empty list in the case where externalReferences is null. The approach is similar to other methods [1] [2] in this code base where a field is not marked as @Nullable.