samtools / htsjdk

A Java API for high-throughput sequencing data (HTS) formats.
http://samtools.github.io/htsjdk/
283 stars 242 forks source link

Spotbugs remaining fixes #1303

Closed tomwhite closed 5 years ago

tomwhite commented 5 years ago

Fix all the remaining issues found by Spotbugs (in addition to those in #1277 and #1278). In some cases it is not clear if there is a fix, or what the best fix would be that maintains existing behaviour, so I've added these cases to an exclude list. With the changes to the Gradle build file new violations will be picked up by causing the build to fail.

/cc @lbergelson

Checklist

codecov-io commented 5 years ago

Codecov Report

Merging #1303 into master will decrease coverage by 0.015%. The diff coverage is 66.667%.

@@               Coverage Diff               @@
##              master     #1303       +/-   ##
===============================================
- Coverage     67.644%   67.628%   -0.015%     
- Complexity      8188      8229       +41     
===============================================
  Files            560       562        +2     
  Lines          33462     33619      +157     
  Branches        5635      5640        +5     
===============================================
+ Hits           22635     22736      +101     
- Misses          8644      8709       +65     
+ Partials        2183      2174        -9
Impacted Files Coverage Δ Complexity Δ
...java/htsjdk/samtools/MergingSamRecordIterator.java 59.494% <100%> (ø) 19 <0> (ø) :arrow_down:
...ava/htsjdk/samtools/cram/compression/rans/E14.java 90.566% <100%> (+1.887%) 3 <0> (ø) :arrow_down:
src/main/java/htsjdk/samtools/util/IOUtil.java 58.213% <100%> (+0.607%) 118 <3> (ø) :arrow_down:
...n/java/htsjdk/samtools/util/SortingCollection.java 64.444% <100%> (ø) 16 <0> (ø) :arrow_down:
...tsjdk/tribble/readers/AsciiLineReaderIterator.java 84% <100%> (ø) 6 <0> (ø) :arrow_down:
...in/java/htsjdk/samtools/TextualBAMIndexWriter.java 66.667% <20%> (-0.866%) 12 <0> (ø)
...c/main/java/htsjdk/samtools/util/ftp/FTPReply.java 0% <0%> (-44.444%) 0% <0%> (-9%)
.../main/java/htsjdk/samtools/util/ftp/FTPClient.java 0% <0%> (-23.171%) 0% <0%> (-6%)
...mtools/seekablestream/SeekableFTPStreamHelper.java 0% <0%> (-19.355%) 0% <0%> (-1%)
...c/main/java/htsjdk/samtools/util/ftp/FTPUtils.java 0% <0%> (-17.544%) 0% <0%> (-2%)
... and 52 more
lbergelson commented 5 years ago

Rebased and merged this as #1331