jamesfredley opened a new pull request, #15548: URL: https://github.com/apache/grails-core/pull/15548
## Summary - **Bug**: `HibernateProxyHandler.isInitialized()` in Hibernate 7 was missing Groovy proxy support, causing uninitialized Groovy proxies to be incorrectly reported as initialized. The fallback `Hibernate.isInitialized()` returns `true` for any non-Hibernate object, masking the bug. - **Fix**: Add `GroovyProxyInterceptorLogic.isInitialized()` helper that checks `ProxyInstanceMetaClass.isProxyInitiated()`, and invoke it from `HibernateProxyHandler.isInitialized()` before the Hibernate fallback. - **Parity**: The Hibernate 5 implementation already had this check. This restores behavioral parity with Hibernate 5. ## Changes | File | Change | |------|--------| | `GroovyProxyInterceptorLogic.java` | Add `isInitialized(Object)` static helper method | | `HibernateProxyHandler.java` | Call `GroovyProxyInterceptorLogic.isInitialized()` before `Hibernate.isInitialized()` fallback | | `HibernateProxyHandler7Spec.groovy` | Add test: "test isInitialized for a Groovy proxy before initialization" | ## Testing All 21 `HibernateProxyHandler7Spec` tests pass, including the new Groovy proxy `isInitialized` test. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
