Fix: Prioritize searching for singletons in all class types when determining best creators - #3664
Closed
justcarlux wants to merge 1 commit into
Closed
Fix: Prioritize searching for singletons in all class types when determining best creators#3664justcarlux wants to merge 1 commit into
justcarlux wants to merge 1 commit into
Conversation
…rmining best creators
Owner
|
Expanding this branch to every class makes StructureCache.newInstance() return any public static self-typed object, even when the class is mutable. Because StructureCache::newInstance is also the destination factory used by FieldCloner, deep cloning such a value can write into shared global state. I think we can make this work for the most part by tieing it together with ImmutableDetector. I'll make a follow up commit and credit you as a co-author |
Contributor
Author
|
Yeah, I knew that I might've had other side effects, I admit it was a rushed solution since I didn't take the time to read into the rest of the codebase properly. Thanks for looking into it though. |
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.
This addresses the following issue: #3663
For more information about this issue, please refer to my minimal reproducible example's README: https://github.com/justcarlux/protocollib-overriding-1.8-world-types-example