Skip to content

Commit

Permalink
fix: don't fail with NPE if there are no code list associations
Browse files Browse the repository at this point in the history
This prevents a `NullPointerException` when a deegree configuration is
written with the Primitive option `All link where code lists are
assigned in hale` and there are no codelist associations in the
alignment.
  • Loading branch information
florianesser authored and stempler committed Jul 12, 2019
1 parent a817389 commit 0f8ffd3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ else if (config.getPrimitiveLinkMode()
.getSetting(CodeListAssociations.KEY_ASSOCIATIONS)
.as(CodeListAssociations.class);

if (associations == null) {
return null;
}

return associations.getAssociations().keySet().stream().map(e -> {
List<QName> names = e.getNames();
if (names.size() > 1) {
Expand Down

0 comments on commit 0f8ffd3

Please sign in to comment.