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

Changed CapInputStream #1335

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Changed CapInputStream #1335

merged 1 commit into from
Oct 4, 2024

Conversation

UFA-MOROZOV
Copy link
Contributor

@yegor256, after reviewing code of CapInputStream i found possible mistake in logic. There we have skip function, which skips buffer, however this class is different from InputStream because of its cap. So by logic, skipping something should also change cap. So i ran all tests written before me with my changes of code, they all went good, and i created my own test, that checks one simple case:
we have stream and cap of 50
we skip 75, it should skip 50, since the cap is 50, and also it should decrease "more" variable, which represents how much we can read at that point and not violate cap.

@yegor256
Copy link
Owner

yegor256 commented Oct 4, 2024

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Oct 4, 2024

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit c28275d into yegor256:master Oct 4, 2024
13 checks passed
@rultor
Copy link
Collaborator

rultor commented Oct 4, 2024

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 26min)

@yegor256
Copy link
Owner

yegor256 commented Oct 4, 2024

@UFA-MOROZOV thanks!

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.

3 participants