mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Prior to this commit, Hibernate 8 types extending `MutationOrSelectionQuery` would fail proxying at runtime in native images because reflection hints were not registered at build time. While the `MutationOrSelectionQueryImpl` case can be solved with an additional proxy hint, `NativeMutationOrSelectionQueryImpl` is impossible to solve that way due to multi interface mismatch. This was found in gh-36878 and handled with a fallback proxy. In this case, native image will throw a `MissingReflectionRegistrationError` - but obviously we cannot depend on this type in JVM applications. `MissingReflectionRegistrationError` extends `LinkageError`, which we will use along IllegalArgumentException` to detect that the proxying operation failed and that we should use the fallback. This commit also register a proxy hint for the said fallback. Fixes gh-37251