mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 22:43:12 +00:00
Merge pull request #8045 from atmire/Avoid-incorrect-sort-entities
Avoid incorrect sort
This commit is contained in:
@@ -625,7 +625,9 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
|
|||||||
public int compare(MetadataValue o1, MetadataValue o2) {
|
public int compare(MetadataValue o1, MetadataValue o2) {
|
||||||
int compare = o1.getPlace() - o2.getPlace();
|
int compare = o1.getPlace() - o2.getPlace();
|
||||||
if (compare == 0) {
|
if (compare == 0) {
|
||||||
if (o1 instanceof RelationshipMetadataValue) {
|
if (o1 instanceof RelationshipMetadataValue && o2 instanceof RelationshipMetadataValue) {
|
||||||
|
return compare;
|
||||||
|
} else if (o1 instanceof RelationshipMetadataValue) {
|
||||||
return 1;
|
return 1;
|
||||||
} else if (o2 instanceof RelationshipMetadataValue) {
|
} else if (o2 instanceof RelationshipMetadataValue) {
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user