Fix subtle bug in the ReduceReads stash reported by Adam

* The tailSet generated every time we flush the reads stash is still being affected by subsequent clears because it is just a pointer to the parent element in the original TreeSet. This is dangerous, and there is a weird  condition where the clear will affects it.
   * Fix by creating a new set, given the tailSet instead of trying to do magic with just the pointer.
This commit is contained in:
Mauricio Carneiro 2012-02-23 18:25:01 -05:00
parent e0c189909f
commit ee9a56ad27
1 changed files with 4 additions and 2 deletions

View File

@ -36,8 +36,10 @@ public class AlignmentStartWithNoTiesComparator implements Comparator<SAMRecord>
result = cmpContig;
else {
if (r1.getAlignmentStart() < r2.getAlignmentStart()) result = -1;
else result = 1;
if (r1.getAlignmentStart() < r2.getAlignmentStart())
result = -1;
else
result = 1;
}
}