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

Simplify CountingInputstreamWithCallback and remove unnecessary constructs #86

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

bidetofevil
Copy link
Collaborator

@bidetofevil bidetofevil commented Nov 17, 2023

Goal

Simplified implementation of the wrapped stream to not return the bytes in the callback. This could probably be furthered simplified to not count bytes, but there's some logic there involving stream marking and reseting that I don't fully grok yet, so I'd rather not touch it.

I've also removed a couple of backwards compatible constructs that aren no longer necessary.

Testing

Existing tests pass.

Copy link
Collaborator Author

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Merging #86 (22b981f) into hho/response-size (0dfc038) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##           hho/response-size      #86   +/-   ##
==================================================
  Coverage              76.02%   76.03%           
==================================================
  Files                    313      313           
  Lines                  10095    10096    +1     
  Branches                1454     1454           
==================================================
+ Hits                    7675     7676    +1     
  Misses                  1832     1832           
  Partials                 588      588           
Files Coverage Δ
.../network/http/CountingInputStreamWithCallback.java 43.58% <100.00%> (ø)
...nal/network/http/EmbraceUrlConnectionDelegate.java 82.79% <100.00%> (+0.06%) ⬆️

@bidetofevil bidetofevil marked this pull request as ready for review November 17, 2023 07:55
@bidetofevil bidetofevil requested a review from a team as a code owner November 17, 2023 07:55
Copy link
Contributor

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Base automatically changed from hho/response-size to master November 17, 2023 15:59
@bidetofevil bidetofevil merged commit a2d22e3 into master Nov 17, 2023
3 checks passed
@bidetofevil bidetofevil deleted the hho/simplify branch November 17, 2023 16:00
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.

None yet

2 participants