fixed NPE

This commit is contained in:
Sandro La Bruzzo 2020-02-26 14:40:02 +01:00
parent 5d0f46651b
commit c3ecabd8e8
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ public class Scholix implements Serializable {
Relation rel = mapper.readValue(relation, Relation.class);
final Scholix s = new Scholix();
if (scholixSummary.getDate() != null)
s.setPublicationDate(scholixSummary.getDate().stream().findFirst().orElse(null));
s.setPublicationDate(scholixSummary.getDate().stream().findAny().orElse(null));
s.setLinkprovider(rel.getCollectedFrom().stream().map(cf ->
new ScholixEntityId(cf.getValue(), Collections.singletonList(
new ScholixIdentifier(cf.getKey(), "dnet_identifier")