Repository navigation
Fix several edge-case bugs and strengthen tests - #227
Draft
sophiecarreras wants to merge 1 commit into
Draft
sophiecarreras wants to merge 1 commit into
sophiecarreras wants to merge 1 commit into
Conversation
Fixes: - B2AccountAuthorizationCache: do not cache an authorization for a different account after the account-id mismatch check fails. - B2WebApiHttpClientImpl.getContent: honor the timeouts configured on the HttpClientFactory (adds default HttpClientFactory.getRequestConfig()). - B2LargeFileStorer: compute part index and start byte from the sorted part list so progress events are right for out-of-order parts. - B2CancellableContentSource: close the wrapped stream even when close() reports the cancellation. - B2EventNotificationRule: isSuspended() and compareTo() no longer throw NullPointerException when suspension fields are not provided. - B2InputStreamExcerpt.skip(): do not advance the position twice. - B2Json LocalDate/ConcurrentMap/EnumSet handlers: throw B2JsonException for invalid dates and null elements instead of unchecked exceptions. Tests: new tests for each fix, plus stronger tests for the finish-large-file request payload, content writer sha1 handling, ranged content sources, unverified sha1 headers, JSON field handling and BigInteger, resume, and error-path download tests that could never fail. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sophiecarreras
requested review from
eduardo-pavez-backblaze,
ffumero2003 and
goanpeca
November 2, 2026 15:18
Contributor
Author
|
Review request from Sofia (drafted with Claude). Nothing in this review has been checked by a human yet; the numbers come from an agent review of whole
This PR: nothing open besides the review. CI is green. Ready for sign-off. |
Contributor
Author
|
@jeronimodeleon: you are the sign-off for this PR once Felipe, Gonzalo and Eduardo have reviewed it. GitHub would not let me add you as a reviewer (you have read access on this repo), so this is your request. What to confirm is in the comment above. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes seven edge-case bugs found in a review of master, and adds or strengthens tests. Each fix has a test.
Fixes
B2AccountAuthorizationCache: no longer caches an authorization for a different account after the account-id mismatch check fails.B2WebApiHttpClientImpl.getContent: honors the timeouts configured on theHttpClientFactory. Adds a defaultHttpClientFactory.getRequestConfig(), overridden byHttpClientFactoryImpl.B2LargeFileStorer: part index and start byte come from the sorted part list, so progress events are correct for out-of-order parts.B2CancellableContentSource: the wrapped stream is closed even whenclose()reports the cancellation.B2EventNotificationRule:isSuspended()andcompareTo()no longer throwNullPointerExceptionwhen suspension fields are not provided.B2InputStreamExcerpt.skip(): no longer advances the position twice.B2JsonExceptionfor invalid dates and null elements instead of unchecked exceptions.Tests
getContentdoes not throw.Notes for reviewers
HttpClientFactorygains a default method; custom factories keep the default timeouts unless they override it../gradlew test(core 703, httpclient 4, 0 failures) andcheck_code. The fail-before proofs were run on the individual changes earlier, not re-run on this combined branch.🤖 Generated with Claude Code