Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SpotBugs] contentId isn't initialized in htsjdk.samtools.cram.structure.block.ExternalBlock.getContentId() when invoked from constructor for superclass #1279

Closed
tomwhite opened this issue Feb 13, 2019 · 0 comments
Assignees
Labels

Comments

@tomwhite
Copy link
Contributor

This looks like a real bug in CRAM. /cc @jmthibault79, @cmnbroad

See https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#ur-uninitialized-read-of-field-method-called-from-constructor-of-superclass-ur-uninit-read-called-from-super-constructor

Part of #1267

Report:

In class htsjdk.samtools.cram.structure.block.ExternalBlock
In method htsjdk.samtools.cram.structure.block.ExternalBlock.getContentId()
Field htsjdk.samtools.cram.structure.block.ExternalBlock.contentId
Superclass constructor is new htsjdk.samtools.cram.structure.block.Block(BlockCompressionMethod, BlockContentType, byte[], int)
Call from superclass constructor at Block.java:[line 86]
Constructor is new htsjdk.samtools.cram.structure.block.ExternalBlock(BlockCompressionMethod, int, byte[], int)
Field set (too late) at ExternalBlock.java:[line 26]
At ExternalBlock.java:[line 31]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants