avoid repeating identical values for fields: source, description

This commit is contained in:
Claudio Atzori 2020-07-16 13:45:53 +02:00
parent 805de4eca1
commit b098cc3cbe
1 changed files with 2 additions and 2 deletions

View File

@ -329,7 +329,7 @@ public class XmlRecordFactory implements Serializable {
.stream()
.filter(Objects::nonNull)
.map(c -> XmlSerializationUtils.asXmlElement("description", c.getValue()))
.collect(Collectors.toList()));
.collect(Collectors.toCollection(HashSet::new)));
}
if (r.getEmbargoenddate() != null) {
metadata
@ -370,7 +370,7 @@ public class XmlRecordFactory implements Serializable {
.stream()
.filter(Objects::nonNull)
.map(c -> XmlSerializationUtils.asXmlElement("source", c.getValue()))
.collect(Collectors.toList()));
.collect(Collectors.toCollection(HashSet::new)));
}
if (r.getFormat() != null) {
metadata