Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Insert AssertionErrors in "impossible" code branches #24

@OLEGSHA

Description

@OLEGSHA

Throughout the project there are multiple instances of code branches, usually catch blocks, which are commented as unreachable. For enhanced robustness, throw new AssertionError("Unreachable code"); should be placed in such places to help identify logic errors.

Code locations of interest are currently marked with comments such as "Impossible" or "X can't happen". A thorough search should be conducted in the entire codebase for these occurrences.

Example

try {
	ChunkIO.save(chunk, this.data.getWriter(), IOContext.COMMS);
} catch (IOException e) {
	// Impossible
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions