Skip to content

Commit f4ebf9f

Browse files
author
Dmytro Guzenko
committed
transformation ordering fix: total order required for the comparator
1 parent 8a7b651 commit f4ebf9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

biojava-structure/src/main/java/org/biojava/nbio/structure/quaternary/BiologicalAssemblyBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,9 @@ public int compare(BiologicalAssemblyTransformation t1, BiologicalAssemblyTransf
144144
// set sort order only if the two ids are identical
145145
if (t1.getId().equals(t2.getId())) {
146146
return chainIds.indexOf(t1.getChainId()) - chainIds.indexOf(t2.getChainId());
147+
} else {
148+
return t1.getId().compareTo(t2.getId());
147149
}
148-
return 0;
149150
}
150151
});
151152
}

0 commit comments

Comments
 (0)