Repository navigation
Don't cache fragment classes across different class loaders - #87
Closed
simonschiller wants to merge 2 commits into
Closed
simonschiller wants to merge 2 commits into
simonschiller wants to merge 2 commits into
Conversation
ianhanniballake
requested changes
Oct 14, 2020
| val classLoader = CountingClassLoader() | ||
| factory.instantiate(classLoader, TestFragment::class.java.name) | ||
| factory.instantiate(classLoader, TestFragment::class.java.name) | ||
| assertEquals(1, classLoader.loadCount) |
Member
There was a problem hiding this comment.
Please use Truth asserts (note, we already have a test dependency on Truth) over Junit asserts here and elsewhere in this file:
assertThat(classLoader.loadCount).isEqualTo(1)
Or preferably use the assertWithMessage() version that includes a more detailed message that is printed when the assert fails.
ianhanniballake
approved these changes
Oct 15, 2020
Member
|
Thanks for putting in this PR! It'll be available in the next Fragment release. |
harryzz
pushed a commit
to harryzz/compose-multiplatform-core
that referenced
this pull request
Jul 28, 2026
## Proposed Changes - Don't cache fragment classes across different class loaders inside `FragmentFactory`. ## Testing Test: Added tests to verify the change ## Issues Fixed Fixes: 113886460 This is an imported pull request from androidx#87. Resolves JetBrains#87 Github-Pr-Head-Sha: e5f5916 GitOrigin-RevId: babb5e1 Change-Id: I07d5541a45ccadcf7159854818000455e245d118
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.
Proposed Changes
FragmentFactory.Testing
Test: Added tests to verify the change
Issues Fixed
Fixes: 113886460