1
0
Fork 0

[graph raw] rule out empty PIDs

This commit is contained in:
Claudio Atzori 2024-10-29 13:48:41 +01:00
parent 499892b67c
commit 5ca031c8d6
2 changed files with 2 additions and 1 deletions

View File

@ -204,6 +204,7 @@ public class IdentifierFactory implements Serializable {
.map(
pp -> pp
.stream()
.filter(p -> StringUtils.isNotBlank(p.getValue()))
// filter away PIDs provided by a DS that is not considered an authority for the
// given PID Type
.filter(p -> shouldFilterPidByCriteria(collectedFrom, p, mapHandles))

View File

@ -26,7 +26,7 @@ public class PidCleaner {
String value = Optional
.ofNullable(pidValue)
.map(String::trim)
.orElseThrow(() -> new IllegalArgumentException("PID value cannot be empty"));
.orElseThrow(() -> new IllegalArgumentException("PID (" + pidType + ") value cannot be empty"));
switch (pidType) {