samtools / htsjdk

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

Improve error message in AbstractRecordAndOffset #1484

Closed lbergelson closed 4 years ago

lbergelson commented 4 years ago

Description

This might help debug a bug the production team is seeing.

Things to think about before submitting:

codecov-commenter commented 4 years ago

Codecov Report

Merging #1484 into master will decrease coverage by 0.002%. The diff coverage is 0.000%.

@@               Coverage Diff               @@
##              master     #1484       +/-   ##
===============================================
- Coverage     69.216%   69.214%   -0.002%     
  Complexity      8704      8704               
===============================================
  Files            588       588               
  Lines          34583     34584        +1     
  Branches        5780      5780               
===============================================
  Hits           23937     23937               
- Misses          8366      8367        +1     
  Partials        2280      2280               
Impacted Files Coverage Δ Complexity Δ
.../htsjdk/samtools/util/AbstractRecordAndOffset.java 80.769% <0.000%> (-3.231%) 9.000 <0.000> (ø)
lbergelson commented 4 years ago

@jamesemery I added the same record toString as well.

lbergelson commented 4 years ago

The string + operator does a null check. It's basically x == null ? "null" : x.toString()