From 10961db3ce04c46ac1370f40ee9640824fc30aaa Mon Sep 17 00:00:00 2001 From: Ryan Poplin Date: Tue, 21 Aug 2012 09:35:55 -0400 Subject: [PATCH] Another round of FindBugs fixes. Object returns its internal reference to an externally mutable array. Very dangerous. --- .../sting/gatk/walkers/haplotypecaller/DeBruijnVertex.java | 2 +- public/java/src/org/broadinstitute/sting/utils/Haplotype.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/DeBruijnVertex.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/DeBruijnVertex.java index 358bd0c38..4da3251bc 100755 --- a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/DeBruijnVertex.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/DeBruijnVertex.java @@ -37,7 +37,7 @@ public class DeBruijnVertex { } public byte[] getSequence() { - return sequence; + return sequence.clone(); } public byte[] getSuffix() { diff --git a/public/java/src/org/broadinstitute/sting/utils/Haplotype.java b/public/java/src/org/broadinstitute/sting/utils/Haplotype.java index efddf1468..befd24307 100755 --- a/public/java/src/org/broadinstitute/sting/utils/Haplotype.java +++ b/public/java/src/org/broadinstitute/sting/utils/Haplotype.java @@ -140,10 +140,10 @@ public class Haplotype { } public double[] getQuals() { - return quals; + return quals.clone(); } public byte[] getBases() { - return bases; + return bases.clone(); } public long getStartPosition() {