Skip to content
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

[GR-52030] Implement stable name for Proxy type using the names of its interfaces, class loader and module #8413

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

graalvmbot
Copy link
Collaborator

The name of Proxy classes in Native Image is currently not stable between different images as it is generated using a unique id that can change in each JVM instance.

This PR implements a stable name for those types by using the hashCode of the interfaces that compose the Proxy class and the ClassLoader name. For a Proxy type of the form [proxy.module]./$Proxy[id], the new name would be [proxy.module]./$Proxy.s[hashCode], with hashCode being the hash code of the string containing the concatenation of all the interface names (in the order provided by Class.getInterfaces) and the name of the class loader or if it does not have one, the name of its class.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 20, 2024
@graalvmbot graalvmbot force-pushed the scoppey/GR-52030/proxy-type-stable-name branch from 86b9bad to 172b086 Compare February 21, 2024 09:52
@graalvmbot graalvmbot changed the title [GR-52030] Implement stable name for Proxy type [GR-52030] Implement stable name for Proxy type using the names of its interfaces, class loader and module Feb 21, 2024
@graalvmbot graalvmbot force-pushed the scoppey/GR-52030/proxy-type-stable-name branch 2 times, most recently from 9e8701b to 684ec07 Compare February 21, 2024 17:51
@graalvmbot graalvmbot force-pushed the scoppey/GR-52030/proxy-type-stable-name branch from 684ec07 to c814484 Compare February 21, 2024 22:40
@graalvmbot graalvmbot closed this Feb 22, 2024
@graalvmbot graalvmbot deleted the scoppey/GR-52030/proxy-type-stable-name branch February 22, 2024 07:01
@graalvmbot graalvmbot merged commit f269c9d into master Feb 22, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants