From 727b69fce08859c29738f58faa51188dd3608803 Mon Sep 17 00:00:00 2001 From: aaron Date: Wed, 14 Oct 2009 20:07:15 +0000 Subject: [PATCH] catch null output destinations earlier git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1843 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/utils/genotype/vcf/VCFGenotypeWriterAdapter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFGenotypeWriterAdapter.java b/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFGenotypeWriterAdapter.java index 0a9025bd4..6e1251dae 100644 --- a/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFGenotypeWriterAdapter.java +++ b/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFGenotypeWriterAdapter.java @@ -20,7 +20,6 @@ public class VCFGenotypeWriterAdapter implements GenotypeWriter { private VCFHeader mHeader = null; private String mSource; private String mReferenceName; - private final Map mSampleNames = new HashMap(); private boolean mInitialized = false; private final File mFile; private final OutputStream mStream; @@ -29,6 +28,7 @@ public class VCFGenotypeWriterAdapter implements GenotypeWriter { mReferenceName = referenceName; mSource = source; mFile = writeTo; + if (mFile == null) throw new RuntimeException("VCF output file must not be null"); mStream = null; } @@ -37,6 +37,8 @@ public class VCFGenotypeWriterAdapter implements GenotypeWriter { mSource = source; mFile = null; mStream = writeTo; + if (mStream == null) throw new RuntimeException("VCF output stream must not be null"); + } /**