hibernate-orm
hibernate-orm copied to clipboard
HHH-15856 pollution mitigations
Mitgations for Loadable, EntityPersister and EntityInitializer.
Thanks for your pull request!
This pull request appears to follow the contribution rules.
› This message was automatically generated.
nitpick: finishing each commit description with a "." looks a bit odd :)
A suggestion, this can be done in a simpler way:
- https://github.com/hibernate/hibernate-orm/commit/fc6c2cbd05aabe47fd482cc8a2d8ea5089b00734
Yes a good suggestion. What do you want to do here. I re-work the existing commits or use this commit you suggested ?
I've rebased it, and then removed all the overrides you don't actually need to make it simpler.
And now that it's simpler and I can understand what you're doing, I see it's adding a couple of public methods directly on the public API :( not sure if that's a good idea.
@sebersole what do you think of adding the following two methods on the EntityPersister
API ?
default org.hibernate.persister.entity.Loadable asLoadable() {
return null;
}
@Override
default EntityPersister asEntityPersister() {
return this;
}
these are methods which are only needed for technical reasons as a workaround for a JDK performance issue. They aren't of interest to end users, so it bothers me a bit to have them there.