added filter on null value after map function

This commit is contained in:
Enrico Ottonello 2020-10-22 15:11:02 +02:00
parent 846ba30873
commit c58db1c8ea
1 changed files with 2 additions and 1 deletions

View File

@ -185,6 +185,7 @@ public class PublicationToOaf implements Serializable {
.map(t -> {
return mapStructuredProperty(t, q, null);
})
.filter(s -> s!=null)
.collect(Collectors.toList()));
// Adding identifier
final String id = getStringValue(rootElement, "id");
@ -376,7 +377,7 @@ public class PublicationToOaf implements Serializable {
.map(r -> {
return mapStructuredProperty(r, q, null);
})
.collect(Collectors.toList()));
.filter(s -> s!=null).collect(Collectors.toList()));
}
}