mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-13 21:13:19 +00:00
Merge branch 'master' into w2p-68820_Moving-relationships-ITs
Conflicts: dspace-api/src/main/java/org/dspace/content/DSpaceObjectServiceImpl.java
This commit is contained in:
@@ -701,9 +701,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);
|
||||
}
|
||||
|
||||
int idx = 0;
|
||||
@@ -759,4 +761,9 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
|
||||
addAndShiftRightMetadata(context, dso, schema, element, qualifier, lang, value, authority, confidence, index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMetadataModified(T dso) {
|
||||
dso.setMetadataModified();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user