mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-13 21:13:19 +00:00
65997: ReplacePatchOperation function moved to subclasses &
EPersonOperationFactory removed, no longer useful TODO: fix failing tests of replace in two operations
This commit is contained in:
@@ -691,9 +691,11 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
|
||||
|
||||
List<MetadataValue> list = getMetadata(dso, schema, element, qualifier);
|
||||
|
||||
if (from >= list.size()) {
|
||||
if (from >= list.size() || to >= list.size() || to < 0 || from < 0) {
|
||||
throw new IllegalArgumentException(
|
||||
"The \"from\" location MUST exist for the operation to be successful. Idx:" + from);
|
||||
"The \"from\" and \"to\" locations MUST exist for the operation to be successful." +
|
||||
"\n To and from indices must be between 0 and " + (list.size() - 1) +
|
||||
"\n Idx from:" + from + " Idx to: " + to);
|
||||
}
|
||||
|
||||
clearMetadata(context, dso, schema, element, qualifier, Item.ANY);
|
||||
|
Reference in New Issue
Block a user