Continuation relations were missed because of what looks like a copy and paste error.
Also fixed DocumentId.compareTo() so that DocumentIds with the same date can be added to a TreeSet.
Just as an aside, there doesn't seem to be any way to distinguish between parent and child relations once they've been extracted into the List. I don't know how important that is to others. I've modified the code we're using to use a Relation class which has parent and child document ID fields, so we know which is which.
I don't know if you have a JVM level that you're adhering to. I've used some Java 8 features (just in the test).
Continuation relations were missed because of what looks like a copy and paste error.
Also fixed DocumentId.compareTo() so that DocumentIds with the same date can be added to a TreeSet.
Just as an aside, there doesn't seem to be any way to distinguish between parent and child relations once they've been extracted into the List. I don't know how important that is to others. I've modified the code we're using to use a
Relation
class which has parent and child document ID fields, so we know which is which.I don't know if you have a JVM level that you're adhering to. I've used some Java 8 features (just in the test).