Closed cmnbroad closed 4 years ago
Merging #1487 into master will increase coverage by
0.011%
. The diff coverage is50.000%
.
@@ Coverage Diff @@
## master #1487 +/- ##
===============================================
+ Coverage 69.235% 69.246% +0.011%
- Complexity 8721 8723 +2
===============================================
Files 588 588
Lines 34620 34623 +3
Branches 5787 5787
===============================================
+ Hits 23969 23975 +6
+ Misses 8367 8366 -1
+ Partials 2284 2282 -2
Impacted Files | Coverage Δ | Complexity Δ | |
---|---|---|---|
...samtools/seekablestream/SeekableStreamFactory.java | 72.000% <50.000%> (-5.273%) |
6.000 <0.000> (ø) |
|
...samtools/util/AsyncBlockCompressedInputStream.java | 76.000% <0.000%> (+4.000%) |
13.000% <0.000%> (+1.000%) |
|
...htsjdk/samtools/util/nio/DeleteOnExitPathHook.java | 90.476% <0.000%> (+9.524%) |
4.000% <0.000%> (+1.000%) |
Fix exceptions when trying to create a VCFFileReader on a VCF/.tbi when they're located in a path that contains spaces in the name (see https://github.com/broadinstitute/gatk/issues/6664).
The exception is caused by asymmetric assumptions about the encoding of the input string in different layers. This code in
VCFFileReader
converts the input path to a Uri, and the resulting url-encoded String is passed on, but there is downstream code inSeekableStreamFactory.getStreamFor
here that doesn't decode the String, and tries to use the encoded version with theFile
constructor, which fails becauseFile
wants the non-encoded path.The fix is to decode the input String in SeekableStreamFactory before passing it on to the
File
constructor (for some reason, callinggetPath
on aURI
returns a decoded string, butgetPath
on aURL
doesn't). Both of the new tests included here fail without this change.