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:
Kristof De Langhe
2020-02-20 17:23:42 +01:00
371 changed files with 10878 additions and 7445 deletions

View File

@@ -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();
}
}