Skip to content

Inconsistent close behavior of sinks and sources returned by corresponding FileSystem methods #262

Closed
@fzhinkin

Description

@fzhinkin

Sinks and sources created for files using FileSystem.sink and FileSystem.source may or may not throw an exception on close failure, depending on the platform.

For instance, on native platforms close(fd) return code is ignored, and nothing will be reported in case of an error.
On the contrary, on JVM, File*Stream.close may throw IOException on a failed close operation.

Moreover, none of RawSink.close and RawSource.close mention that IOException could be thrown.

The behavior should be the same across all the targets. If the correct behavior is to throw an exception (which sounds reasonable to me), then RawSink/Source kdoc may need to be updated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions