belated special case fix for Menachem; if the results of a BTI and BTIMR produce an empty interval list, exception out. This would be solved long term with better handling or empty and / or null interval lists. I'll add a JIRA
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4754 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
a181680814
commit
7f2ded0706
|
|
@ -113,6 +113,10 @@ public class IntervalUtils {
|
|||
else iTwo++;
|
||||
}
|
||||
|
||||
//if we have an empty list, throw an exception. If they specified intersection and there are no items, this is bad.
|
||||
if (retList == null || retList.size() == 0)
|
||||
throw new UserException.BadInput("The INTERSECTION of your -BTI and -L options produced no intervals.");
|
||||
|
||||
// we don't need to add the rest of remaining locations, since we know they don't overlap. return what we have
|
||||
return retList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class IntervalUtilsUnitTest extends BaseTest {
|
|||
genomeLocParser = new GenomeLocParser(seq);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test(expectedExceptions=UserException.class)
|
||||
public void testMergeListsBySetOperatorNoOverlap() {
|
||||
// a couple of lists we'll use for the testing
|
||||
List<GenomeLoc> listEveryTwoFromOne = new ArrayList<GenomeLoc>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue