Another quick optimization

This commit is contained in:
Eric Banks 2012-02-28 09:25:35 -05:00
parent 40bdadbda5
commit bd398e30fd
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ public class Genotype implements Comparable<Genotype> {
}
public Genotype(String sampleName, List<Allele> alleles, double log10PError, Set<String> filters, Map<String, Object> attributes, boolean isPhased, double[] log10Likelihoods) {
if ( alleles == null )
if ( alleles == null || alleles.size() == 0 )
this.alleles = Collections.emptyList();
else
this.alleles = Collections.unmodifiableList(alleles);