Implemented feedback

This commit is contained in:
Raf Ponsaerts
2019-05-02 15:08:08 +02:00
parent 7dfd34036c
commit 6e21bcdad1
2 changed files with 3 additions and 7 deletions

View File

@@ -1500,17 +1500,16 @@ prevent the generation of resource policy entry values with null dspace_object a
}
private String getEntityTypeStringFromMetadata(List<MetadataValue> list) {
String entityType = null;
for (MetadataValue mdv : list) {
if (StringUtils.equals(mdv.getMetadataField().getMetadataSchema().getName(),
"relationship")
&& StringUtils.equals(mdv.getMetadataField().getElement(),
"type")) {
entityType = mdv.getValue();
return mdv.getValue();
}
}
return entityType;
return null;
}
private RelationshipMetadataValue constructResultingMetadataValue(Item item, String value,

View File

@@ -248,10 +248,7 @@ public class RelationshipServiceImpl implements RelationshipService {
return false;
}
String leftEntityType = list.get(0).getValue();
if (!StringUtils.equals(leftEntityType, entityTypeToProcess.getLabel())) {
return false;
}
return true;
return StringUtils.equals(leftEntityType, entityTypeToProcess.getLabel());
}
public Relationship find(Context context, int id) throws SQLException {