From 77b3b8ff94a47f5601684beead2d2b499863c840 Mon Sep 17 00:00:00 2001 From: Tom White Date: Mon, 11 Feb 2019 19:23:47 +0000 Subject: [PATCH] Fix fields that should be final, as reported by SpotBugs (#1268) --- src/main/java/htsjdk/samtools/SAMRecord.java | 4 ++-- src/main/java/htsjdk/samtools/SamReaderFactory.java | 2 +- src/main/java/htsjdk/samtools/cram/CRAIEntry.java | 2 +- .../reference/ReferenceSequenceFileFactory.java | 5 +++-- src/main/java/htsjdk/samtools/util/TestUtil.java | 2 +- src/main/java/htsjdk/samtools/util/ftp/FTPClient.java | 3 ++- .../tribble/index/interval/IntervalIndexCreator.java | 2 +- .../tribble/index/linear/LinearIndexCreator.java | 2 +- .../java/htsjdk/tribble/index/tabix/TabixFormat.java | 10 +++++----- src/main/java/htsjdk/tribble/util/ParsingUtils.java | 2 +- src/test/java/htsjdk/tribble/TestUtils.java | 2 +- .../java/htsjdk/variant/vcf/VCFHeaderUnitTest.java | 6 +++--- 12 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/main/java/htsjdk/samtools/SAMRecord.java b/src/main/java/htsjdk/samtools/SAMRecord.java index 732faf4722..b8e2185756 100644 --- a/src/main/java/htsjdk/samtools/SAMRecord.java +++ b/src/main/java/htsjdk/samtools/SAMRecord.java @@ -164,12 +164,12 @@ public class SAMRecord implements Cloneable, Locatable, Serializable { * Tags that are known to need the reverse complement if the read is reverse complemented. */ @SuppressWarnings("deprecated") - public static List TAGS_TO_REVERSE_COMPLEMENT = Arrays.asList(SAMTag.E2.name(), SAMTag.SQ.name()); + public static final List TAGS_TO_REVERSE_COMPLEMENT = Arrays.asList(SAMTag.E2.name(), SAMTag.SQ.name()); /** * Tags that are known to need the reverse if the read is reverse complemented. */ - public static List TAGS_TO_REVERSE = Arrays.asList(SAMTag.OQ.name(), SAMTag.U2.name()); + public static final List TAGS_TO_REVERSE = Arrays.asList(SAMTag.OQ.name(), SAMTag.U2.name()); private String mReadName = null; private byte[] mReadBases = NULL_SEQUENCE; diff --git a/src/main/java/htsjdk/samtools/SamReaderFactory.java b/src/main/java/htsjdk/samtools/SamReaderFactory.java index 506bd79305..5838eb63af 100644 --- a/src/main/java/htsjdk/samtools/SamReaderFactory.java +++ b/src/main/java/htsjdk/samtools/SamReaderFactory.java @@ -607,7 +607,7 @@ void applyTo(final SRAFileReader underlyingReader, final SamReader reader) { }; - public static EnumSet