protect against nulls

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3987 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
aaron 2010-08-09 19:21:39 +00:00
parent 8944800f60
commit 5b0b9e79ba
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ public class IntervalUtils {
*/
public static List<GenomeLoc> mergeListsBySetOperator(List<GenomeLoc> setOne, List<GenomeLoc> setTwo, IntervalSetRule rule) {
// shortcut, if either set is zero, return the other set
if (setOne.size() == 0 || setTwo.size() == 0) return (setOne.size() == 0) ? setTwo : setOne;
if (setOne == null || setOne.size() == 0 || setTwo == null || setTwo.size() == 0) return (setOne == null || setOne.size() == 0) ? setTwo : setOne;
// if we're set to UNION, just add them all
if (rule == IntervalSetRule.UNION) {