You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changed SAMRecord.toString() to emit the SAM format string with all fields (#1762)
* Changed SAMRecord.toString() to emit the SAM format string with all fields.
* Drop sync + trailing newline from SAMRecord.getSAMString.
* Remove deprecated SAMRecord.format() and now-dead helpers.
The text formatting path used by SAMRecord.toString() / getSAMString() has been
cleaned up:
- SAMTextWriter.getSAMString no longer uses a JVM-wide synchronized static cache
of a shared StringWriter/SAMTextWriter. It now allocates a fresh StringWriter
per call. Without this change, every toString() call would have taken a global
monitor.
- SAMTextWriter.writeAlignment is split into a private writeAlignmentNoNewline
plus a thin wrapper that appends '\n'. getSAMString uses the no-newline
variant, so the result no longer needs to be trimmed.
BREAKING CHANGE: SAMRecord.getSAMString() no longer terminates the returned
String with a newline character. This brings SAMRecord into line with the other
getSAMString() implementations (SAMSequenceRecord, SAMReadGroupRecord,
SAMProgramRecord, SAMFileHeader), which already return newline-free strings.
Callers that relied on the trailing '\n' as a separator (e.g. concatenating two
records' SAM strings) must now insert their own separator. Callers that stripped
the newline with .trim() can drop the call.
BREAKING CHANGE: SAMRecord.format() has been removed. Callers should use
SAMRecord.getSAMString() instead.
0 commit comments