Skip to content

Commit

Permalink
Ensure getExternalReferences() will never return null (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndonewar authored Oct 8, 2021
1 parent 27d7bac commit fd95a94
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import java.io.Serializable;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

Expand Down Expand Up @@ -212,6 +213,9 @@ public void setVersionRanges(@Nullable final List<String> versionRanges) {
* @since 1.8.0
*/
public List<URI> getExternalReferences() {
if (externalReferences == null) {
externalReferences = new ArrayList<>();
}
return externalReferences;
}

Expand Down

0 comments on commit fd95a94

Please sign in to comment.