From 8a9fb514b67ae1a66f9e1fa907ae75573e777b87 Mon Sep 17 00:00:00 2001 From: Mauricio Carneiro Date: Thu, 29 Mar 2012 09:34:38 -0400 Subject: [PATCH] simplifying GATKReportColumn constructor logic --- .../sting/gatk/report/GATKReportColumn.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/report/GATKReportColumn.java b/public/java/src/org/broadinstitute/sting/gatk/report/GATKReportColumn.java index 0d969c989..bf7ddda22 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/report/GATKReportColumn.java +++ b/public/java/src/org/broadinstitute/sting/gatk/report/GATKReportColumn.java @@ -60,24 +60,12 @@ public class GATKReportColumn extends LinkedHashMap { if ( format.equals("") ) { this.format = "%s"; this.dataType = GATKReportDataType.Unknown; - if ( defaultValue != null ) { - this.defaultValue = defaultValue; - //this.dataType = GATKReportDataType.fromObject(defaultValue); - } - else { - this.defaultValue = ""; - //this.dataType = GATKReportDataType.Unknown; - } + this.defaultValue = (defaultValue != null) ? defaultValue : ""; } else { this.format = format; this.dataType = GATKReportDataType.fromFormatString(format); - if ( defaultValue == null ) { - this.defaultValue = dataType.getDefaultValue(); - } - else { - this.defaultValue = defaultValue; - } + this.defaultValue = (defaultValue != null) ? defaultValue : dataType.getDefaultValue(); } }