Skip to content

Conversation

@arjankowski
Copy link
Contributor

No description provided.

@coveralls
Copy link

Pull Request Test Coverage Report for Build #4180

Details

  • 5 of 10 (50.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 71.751%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/com/box/sdk/BinaryBodyUtils.java 5 10 50.0%
Totals Coverage Status
Change from base Build #4176: -0.02%
Covered Lines: 8077
Relevant Lines: 11257

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build #4177

Details

  • 5 of 10 (50.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 71.751%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/com/box/sdk/BinaryBodyUtils.java 5 10 50.0%
Totals Coverage Status
Change from base Build #4176: -0.02%
Covered Lines: 8077
Relevant Lines: 11257

💛 - Coveralls

@coveralls
Copy link

coveralls commented Nov 26, 2024

Pull Request Test Coverage Report for Build #4219

Details

  • 4 of 15 (26.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.06%) to 71.717%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/com/box/sdk/BinaryBodyUtils.java 4 15 26.67%
Totals Coverage Status
Change from base Build #4206: -0.06%
Covered Lines: 8076
Relevant Lines: 11261

💛 - Coveralls

private static long getContentLengthFromAPIResponse(BoxAPIResponse response) {
long length = response.getContentLength();
try {
if (length == -1 && response.getHeaders().containsKey(X_ORIGINAL_CONTENT_LENGTH)) {

Choose a reason for hiding this comment

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

The code on line 93 checks for the size of the body, could you add one more checked please here
for the header response.getHeaders().containsKey(HttpHeaders.CONTENT_LENGTH) as well please. Basically,

  1. Check for response.getContentLength()
  2. Check for response.getHeaders().containsKey(HttpHeaders.CONTENT_LENGTH)
  3. Check for response.getHeaders().containsKey(X_ORIGINAL_CONTENT_LENGTH)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@arjankowski arjankowski force-pushed the aj/fix-content-length-check branch from 365a523 to 6c742ca Compare November 28, 2024 15:51
@arjankowski arjankowski force-pushed the aj/fix-content-length-check branch from 6c742ca to f08074a Compare November 28, 2024 15:52
@arjankowski arjankowski merged commit b1d5371 into main Nov 29, 2024
12 checks passed
@arjankowski arjankowski deleted the aj/fix-content-length-check branch November 29, 2024 08:36
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.

5 participants