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

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

Open
fzhinkin opened this issue Feb 14, 2024 · 0 comments

Comments

@fzhinkin
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant