Skip to content

support additional class loaders for savables#2888

Merged
riccardobl merged 3 commits into
jMonkeyEngine:masterfrom
riccardobl:savablecs
Jun 24, 2026
Merged

support additional class loaders for savables#2888
riccardobl merged 3 commits into
jMonkeyEngine:masterfrom
riccardobl:savablecs

Conversation

@riccardobl

Copy link
Copy Markdown
Member

Reimplement deprecated apis needed to fix jMonkeyEngine/sdk#659

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for loading Savable classes using additional class loaders provided by the AssetManager during binary import. This is achieved by overloading SavableClassUtil.fromName to accept a collection of class loaders and attempting to load classes through them if the default lookup fails. Feedback focuses on thread safety and performance optimizations: specifically, synchronizing the iteration over additionalClassLoaders to prevent ConcurrentModificationException and caching the class loaders in BinaryImporter to avoid redundant list allocations and GC pressure during object loading.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread jme3-core/src/main/java/com/jme3/export/SavableClassUtil.java
@riccardobl riccardobl merged commit 69a1041 into jMonkeyEngine:master Jun 24, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't open scene due to broken control

2 participants