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

[resources] Read exactly requested count of bytes from InputStream on jvm platforms. #4943

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

terrakok
Copy link
Collaborator

@terrakok terrakok commented Jun 7, 2024

In some cases the skip and read methods may handle less bytes then expected. The PR fixes it by proper API on the JVM and manual check on the Android.

Fixes #4938

Testing

I manually checked it on the project from the issue.

Release Notes

Fixes - Resources

  • Read exactly requested count of bytes from InputStream on jvm platforms.

@AChep
Copy link

AChep commented Jun 7, 2024

You should check for the end of a file in the Android implementation. Currently if you request to read N bytes, but there are less than that it will get stuck in the loop.

@AChep
Copy link

AChep commented Jun 7, 2024

The changes in other Compose files are also probably not needed 😃

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

Successfully merging this pull request may close these issues.

Compose Resource incorrectly reads string chunks from a file
3 participants