diff --git a/protected/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/CombineVariantsIntegrationTest.java b/protected/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/CombineVariantsIntegrationTest.java index 66bc74caa..2eeb9221e 100644 --- a/protected/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/CombineVariantsIntegrationTest.java +++ b/protected/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/CombineVariantsIntegrationTest.java @@ -194,7 +194,7 @@ public class CombineVariantsIntegrationTest extends WalkerTest { " --excludeNonVariants -combineAnnotations -setKey null" + " -L 20:10,000,000-10,001,000", b37KGReference), 1, - Arrays.asList("2e15db35359144683f1e58e147362679")); + Arrays.asList("0413f0725fc5ec3a4f1ee246f6cb3a2a")); cvExecuteTest("combineSingleSamplePipelineGVCF", spec, true); } diff --git a/public/java/src/org/broadinstitute/sting/utils/variant/GATKVariantContextUtils.java b/public/java/src/org/broadinstitute/sting/utils/variant/GATKVariantContextUtils.java index e8c438a53..11cd27a9f 100644 --- a/public/java/src/org/broadinstitute/sting/utils/variant/GATKVariantContextUtils.java +++ b/public/java/src/org/broadinstitute/sting/utils/variant/GATKVariantContextUtils.java @@ -891,7 +891,11 @@ public class GATKVariantContextUtils { } try { final String stringValue = value.toString(); - values.add(stringValue.contains(".") ? Double.parseDouble(stringValue) : Integer.parseInt(stringValue)); + // Branch to avoid unintentional, implicit type conversions that occur with the ? operator. + if (stringValue.contains(".")) + values.add(Double.parseDouble(stringValue)); + else + values.add(Integer.parseInt(stringValue)); } catch (NumberFormatException e) { badAnnotation = true; }