Conversation
Disable URL connection caching and close each manifest input stream after parsing to avoid retaining JAR resources during SDK initialization. Add coverage for successful and malformed manifests. Fixes GH-6120 Co-Authored-By: Claude <noreply@anthropic.com>
📲 Install BuildsAndroid
|
9 tasks
adinauer
marked this pull request as ready for review
September 17, 2026 09:51
adinauer
requested review from
0xadam-brown,
markushi,
romtsn and
runningcode
as code owners
September 17, 2026 09:51
0xadam-brown
approved these changes
Sep 17, 2026
runningcode
requested changes
Sep 17, 2026
| this(ClassLoader.getSystemClassLoader()); | ||
| } | ||
|
|
||
| ManifestVersionReader(final @NotNull ClassLoader classLoader) { |
Contributor
There was a problem hiding this comment.
this constructor allows the creation of mutliple instances of what was previously a lazily instantiated singleton.
Member
Author
There was a problem hiding this comment.
This is just for tests, I'll mark it accordingly.
Mark the injected class loader constructor as test-only and document why manifest URL connection caching must remain disabled. Refs GH-6120 Co-Authored-By: Claude <noreply@anthropic.com>
Member
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.
📜 Description
ManifestVersionReaderfinishes parsing it, including malformed manifests.jar:connections release theirJarFileand inflater resources when closed.💡 Motivation and Context
ManifestVersionReaderpassed the result ofURL.openStream()directly toManifest, which does not close the supplied stream. This could retain a stream and associated JAR resources for every manifest scanned during SDK initialization.resolves: #6120
💚 How did you test it?
./gradlew :sentry:test— 3,550 tests passed./gradlew spotlessApply apiDump📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
None.