samtools / htsjdk

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

Add a method to conditionally apply a Consumer on a nullable input #1419

Closed yfarjoun closed 5 years ago

yfarjoun commented 5 years ago

Description

Please explain the changes you made here. Explain the motivation for making this change. What existing problem does the pull request solve?

Things to think about before submitting:

codecov-io commented 5 years ago

Codecov Report

Merging #1419 into master will increase coverage by 0.318%. The diff coverage is 83.333%.

@@               Coverage Diff               @@
##              master     #1419       +/-   ##
===============================================
+ Coverage     68.127%   68.445%   +0.318%     
- Complexity      8381      8673      +292     
===============================================
  Files            573       573               
  Lines          33985     34873      +888     
  Branches        5668      5930      +262     
===============================================
+ Hits           23153     23869      +716     
- Misses          8643      8783      +140     
- Partials        2189      2221       +32
Impacted Files Coverage Δ Complexity Δ
src/main/java/htsjdk/samtools/util/IOUtil.java 61.689% <ø> (+3.276%) 196 <0> (+76) :arrow_up:
src/main/java/htsjdk/samtools/util/CodeUtil.java 71.429% <83.333%> (+4.762%) 4 <4> (+2) :arrow_up:
...htsjdk/samtools/util/nio/DeleteOnExitPathHook.java 86.667% <0%> (-3.81%) 5% <0%> (+1%)
.../htsjdk/samtools/util/AbstractRecordAndOffset.java 81.081% <0%> (-2.919%) 15% <0%> (+6%)
...in/java/htsjdk/samtools/util/SamLocusIterator.java 90.588% <0%> (-1.193%) 23% <0%> (ø)
.../variant/variantcontext/VariantContextBuilder.java 81.992% <0%> (-0.949%) 75% <0%> (+35%)
.../htsjdk/variant/variantcontext/VariantContext.java 79.668% <0%> (+1.664%) 345% <0%> (+108%) :arrow_up:
...c/main/java/htsjdk/samtools/liftover/LiftOver.java 85.167% <0%> (+2.31%) 44% <0%> (+13%) :arrow_up:
.../samtools/reference/AbstractFastaSequenceFile.java 60% <0%> (+2.5%) 18% <0%> (+6%) :arrow_up:
src/main/java/htsjdk/variant/vcf/VCFEncoder.java 88.652% <0%> (+2.794%) 96% <0%> (+28%) :arrow_up:
... and 3 more