Skip to content

Commit

Permalink
Remove Slice setAttribute zero-length-array check
Browse files Browse the repository at this point in the history
Slices' optional tags follow the rules for BAM tagged fields, so
zero-length 'B' arrays are valid. Slice tags are currently unused,
so the question is somewhat moot and there are no test cases.
  • Loading branch information
jmarshall committed Jun 13, 2023
1 parent 1cc8a2c commit f2f92d4
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/main/java/htsjdk/samtools/cram/structure/Slice.java
Original file line number Diff line number Diff line change
Expand Up @@ -745,9 +745,6 @@ public void setReferenceMD5(final CRAMReferenceRegion cramReferenceRegion) {
* @param value tag value
*/
public void setAttribute(final String tag, final Object value) {
if (value != null && value.getClass().isArray() && Array.getLength(value) == 0) {
throw new IllegalArgumentException("Empty value passed for tag " + tag);
}
setAttribute(SAMTag.makeBinaryTag(tag), value);
}

Expand Down

0 comments on commit f2f92d4

Please sign in to comment.