Another quick optimization
This commit is contained in:
parent
40bdadbda5
commit
bd398e30fd
|
|
@ -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) {
|
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();
|
this.alleles = Collections.emptyList();
|
||||||
else
|
else
|
||||||
this.alleles = Collections.unmodifiableList(alleles);
|
this.alleles = Collections.unmodifiableList(alleles);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue