Skip to content

Commit

Permalink
Handling inlined properties that happen to be null- (#230)
Browse files Browse the repository at this point in the history
Signed-off-by: Jad El-khoury <jad.el.khoury@scania.com>
  • Loading branch information
jad-elkhoury committed Dec 22, 2021
1 parent 3ee65db commit 3efaf45
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ public static Preview getPreview(final AbstractResource aResource, List<String>
Collection<AbstractResource> rs = (Collection<AbstractResource>) getterMethod.invoke(aResource);
List<org.eclipse.lyo.server.ui.model.Link> l = new ArrayList<>();
for (AbstractResource r: rs) {
l.add(constructLink(r.getAbout().toString(), r.toString()));
l.add((null == r ? null : constructLink(r.getAbout().toString(), r.toString())));
}
value = constructPropertyValue(PropertyDefintion.RepresentationType.LINK, multiple, l);
} else {
AbstractResource r = (AbstractResource) getterMethod.invoke(aResource);
value = constructPropertyValue(PropertyDefintion.RepresentationType.LINK, multiple, constructLink(r.getAbout().toString(), r.toString()));
value = constructPropertyValue(PropertyDefintion.RepresentationType.LINK, multiple, (null == r ? null : constructLink(r.getAbout().toString(), r.toString())));
}
}
else {
Expand Down

0 comments on commit 3efaf45

Please sign in to comment.