Skip to content

Commit

Permalink
Merge branch 'feature/iiif-er' into feature/add-identifier-meta
Browse files Browse the repository at this point in the history
  • Loading branch information
samleeflang committed Nov 19, 2024
2 parents a9ea14e + e8ee889 commit 9ba31d3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ private static void handleMultipleAgents(
OdsIdentifierStatus identifierStatus) {
var ids = new String[0];
var agentValues = new String[0];
if (checkIfNeedsParsing(agentValue)) {
if (needsParsing(agentValue)) {
agentValues = Arrays.stream(agentValue.split("[&|]")).map(String::trim)
.toArray(String[]::new);
}
if (checkIfNeedsParsing(agentId)) {
if (needsParsing(agentId)) {
ids = Arrays.stream(agentId.split("[&|]")).map(String::trim).toArray(String[]::new);
}
if (agentValues.length == ids.length) {
Expand Down Expand Up @@ -104,7 +104,7 @@ private static void handleMultipleAgents(
}
}

private static boolean checkIfNeedsParsing(String value) {
private static boolean needsParsing(String value) {
return value != null && (value.contains("&") || value.contains("|"));
}
}

0 comments on commit 9ba31d3

Please sign in to comment.