From 7fda409f4eeb38448d71b93a4c7224f012a37690 Mon Sep 17 00:00:00 2001 From: hanna Date: Mon, 30 Mar 2009 23:43:12 +0000 Subject: [PATCH] Fixed bug where read traversals would fail with an exception when not called with a genome_region (-L) argument. From TraversalEngine, line 455, looks like Mark intended an invariant where the list of locations is 0 length if not specified. Made GenomeLoc code compliant with that. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@230 348d0f76-0448-11de-a6fe-93d51630548a --- java/src/org/broadinstitute/sting/utils/GenomeLoc.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/utils/GenomeLoc.java b/java/src/org/broadinstitute/sting/utils/GenomeLoc.java index 521ca0cf2..5e1c7869b 100644 --- a/java/src/org/broadinstitute/sting/utils/GenomeLoc.java +++ b/java/src/org/broadinstitute/sting/utils/GenomeLoc.java @@ -252,7 +252,7 @@ public class GenomeLoc implements Comparable { * @return true if we are past the last location to process */ public static boolean pastFinalLocation(GenomeLoc curr, ArrayList locs) { - if ( locs == null ) + if ( locs.size() == 0 ) return false; else { GenomeLoc last = locs.get(locs.size() - 1); @@ -268,7 +268,7 @@ public class GenomeLoc implements Comparable { * @return true if we should process GenomeLoc curr, otherwise false */ public static boolean inLocations(GenomeLoc curr, ArrayList locs) { - if (locs == null) { + if ( locs.size() == 0 ) { return true; } else { for ( GenomeLoc loc : locs ) {