DS-3755 rename method in differenceInSubmissionFields (was "diff")

This commit is contained in:
Luigi Andrea Pascarelli
2018-01-30 17:45:32 +01:00
parent 5f1e6705ab
commit 34269359c4
2 changed files with 2 additions and 2 deletions

View File

@@ -547,7 +547,7 @@ public class Util {
return toReturn;
}
public static List<String> diff(Collection fromCollection, Collection toCollection) throws DCInputsReaderException {
public static List<String> differenceInSubmissionFields(Collection fromCollection, Collection toCollection) throws DCInputsReaderException {
DCInputsReader reader = new DCInputsReader();
List<DCInputSet> from = reader.getInputsByCollectionHandle(fromCollection.getHandle());
List<DCInputSet> to = reader.getInputsByCollectionHandle(toCollection.getHandle());

View File

@@ -266,7 +266,7 @@ public class WorkspaceItemServiceImpl implements WorkspaceItemService {
source.setCollection(toCollection);
List<MetadataValue> remove = new ArrayList<>();
List<String> diff = Util.diff(fromCollection, toCollection);
List<String> diff = Util.differenceInSubmissionFields(fromCollection, toCollection);
for(String toRemove : diff) {
for(MetadataValue value : source.getItem().getMetadata()) {
if(value.getMetadataField().toString('.').equals(toRemove)) {