-
Notifications
You must be signed in to change notification settings - Fork 3.6k
HHH-19372 HHH-19369 Issues with access optimizer and inheritance #10075
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
Conversation
...va/org/hibernate/orm/test/bytecode/enhancement/optimizer/HierarchyBytecodeOptimizerTest.java
Outdated
Show resolved
Hide resolved
bc6d831
to
1fbb926
Compare
} | ||
final URL url = codeSource.getLocation(); | ||
return url == null ? clazz.getName() : clazz.getName() + url.toString().hashCode(); | ||
return url == null ? className : className + url.toString().hashCode(); |
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.
Just leaving a couple of notes here for the future:
hashCode()
does not prevent possible collisions; I agree it would be extremely rare to have the same class multiple times, and also have conflicting hash-codes for their code source, but still could happen.java.security.CodeSource
access could be blocked viaSecurityManager
- bytecode enhanced classes return
null
here, though from some early testing we don't have any CCEs in that case; it would be great to understand why that works (my hypothesis would be we're using the byte code-enhanced class from byte-buddy in both PUs)
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.
Regarding SecurityManager, I think ORM would be trusted by the SecurityManager and if not, would need changes to ensure it is trusted.
Superseded by #10192 |
https://hibernate.atlassian.net/browse/HHH-19372
https://hibernate.atlassian.net/browse/HHH-19369
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.