Skip to content

BlobReadChannel read trows a non-IOException #219

@agrinh

Description

@agrinh

Couldn't find this discussed anywhere and thought it belonged here, I hope you agree, please let me know otherwise.

BlobReadChannel.read is annotated with @throws IOException which fits the interface and expected behaviour with nio (e.g. I get the expected IOException on read in the standard ReadableBytesChannel interface and in an input stream created with Channels.newInputStream)

However, at least one of the current exceptions thrown is StorageException, which is not an IOException, forcing users to know that this particular ReadbleBytesChannel throws another exception.

Could the exceptions thrown here be modified to inherit from IOException instead?

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/java-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions