-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Side-safety docs #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the explanation for the example code needs to be reworked. It has some inaccuracies, as I've noted in my review comments.
We probably ought to mention the quirk that JVMs are free to load classes lazily or eagerly (see JLS 17 § 12.3 "Linking of Classes and Interfaces") -- it's just that most if not all JVMs, including HotSpot, currently available prefer the lazy way. (Initialization, where static initializers run, is a different matter, and is clearly defined by JLS 17 § 12.4.1 "When Initialization Occurs".)
Co-authored-by: sciwhiz12 <[email protected]>
its too hard go look at the JLS or something idk
This PR adds javadocs to
Dist
explaining best practices with examples on how to prevent Dist-related classloading errors.Resurrection of MinecraftForge/MergeTool#8
Supports the goal of removing
DistExecutor
and informing modders of how to properly guard code.