Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public DvObject generatePid(DvObject dvObject) {
+ ") doesn't match that of the provider, id: " + getId());
}
}
if (dvObject.getAuthority() == null) {
if (dvObject.getAuthority() == null) {
dvObject.setAuthority(getAuthority());
} else {
if (!dvObject.getAuthority().equals(getAuthority())) {
Expand All @@ -209,11 +209,19 @@ public DvObject generatePid(DvObject dvObject) {
if (dvObject.getSeparator() == null) {
dvObject.setSeparator(getSeparator());
} else {
if (!dvObject.getSeparator().equals(getSeparator())) {
//only check separator if identifier is not null because a null authority would be set above...
//SEK 06/26/25 #11546
if (dvObject.getIdentifier() != null
&& !dvObject.getSeparator().equals(getSeparator())) {
logger.warning("The separator of the DvObject (" + dvObject.getSeparator()
+ ") does not match the configured separator (" + getSeparator() + ")");
throw new IllegalArgumentException("The separator of the DvObject (" + dvObject.getSeparator()
+ ") doesn't match that of the provider, id: " + getId());
} else {
//we know it's not null so fill it if it's empty
if (dvObject.getSeparator().isEmpty()) {
dvObject.setSeparator(getSeparator());
}
}
}
if (dvObject.isInstanceofDataset()) {
Expand Down