Commit 85f809c5 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Prevent empty split names from crashing the service.

parent 01ac680d
Pipeline #18545 passed with stage
in 2 minutes and 11 seconds
......@@ -49,7 +49,10 @@ class PersonNormalizer(
} else {
text.split(nameDelimiter).map { it.trim() }
}
if (splitNames.size == 1) {
if (splitNames.isEmpty()) {
log.error("The split names list is empty: $text.")
}
else if (splitNames.size == 1) {
if (singleNameIsLastName) {
item.addLiteral(FOAF.lastName, splitNames[0], value.language)
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment