-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Fix RuntimeHintsPredicates matching rules for public/declared elements #31224
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
theme: aot
An issue related to Ahead-of-time processing
type: bug
A general bug
Milestone
Comments
bclozel
added
type: bug
A general bug
theme: aot
An issue related to Ahead-of-time processing
labels
Sep 13, 2023
jhoeller
added
the
in: core
Issues in core modules (aop, beans, core, context, expression)
label
Sep 14, 2023
essobedo
added a commit
to apache/camel-spring-boot
that referenced
this issue
Oct 23, 2023
…984) ## Motivation Since Spring 6.0.13 and the fix for spring-projects/spring-framework#31224, the member category `INVOKE_DECLARED_METHODS` no longer includes public methods so the code needs to be adapted to this behavior change. ## Modifications: * Register also the member category `INVOKE_PUBLIC_METHODS` when `INVOKE_DECLARED_METHODS` is registered
johnpoth
pushed a commit
to jboss-fuse/camel-spring-boot
that referenced
this issue
Oct 23, 2023
…pache#984) ## Motivation Since Spring 6.0.13 and the fix for spring-projects/spring-framework#31224, the member category `INVOKE_DECLARED_METHODS` no longer includes public methods so the code needs to be adapted to this behavior change. ## Modifications: * Register also the member category `INVOKE_PUBLIC_METHODS` when `INVOKE_DECLARED_METHODS` is registered (cherry picked from commit ba22da8)
essobedo
added a commit
to apache/camel-spring-boot
that referenced
this issue
Oct 23, 2023
…985) ## Motivation Since Spring 6.0.13 and the fix for spring-projects/spring-framework#31224, the member category `INVOKE_DECLARED_METHODS` no longer includes public methods so the code needs to be adapted to this behavior change. ## Modifications: * Register also the member category `INVOKE_PUBLIC_METHODS` when `INVOKE_DECLARED_METHODS` is registered
cunningt
pushed a commit
to jboss-fuse/camel-spring-boot
that referenced
this issue
Nov 27, 2023
…pache#984) (#291) ## Motivation Since Spring 6.0.13 and the fix for spring-projects/spring-framework#31224, the member category `INVOKE_DECLARED_METHODS` no longer includes public methods so the code needs to be adapted to this behavior change. ## Modifications: * Register also the member category `INVOKE_PUBLIC_METHODS` when `INVOKE_DECLARED_METHODS` is registered (cherry picked from commit ba22da8) Co-authored-by: Nicolas Filotto <[email protected]>
Croway
pushed a commit
to apache/camel-spring-boot
that referenced
this issue
Jan 25, 2024
…984) (#291) ## Motivation Since Spring 6.0.13 and the fix for spring-projects/spring-framework#31224, the member category `INVOKE_DECLARED_METHODS` no longer includes public methods so the code needs to be adapted to this behavior change. ## Modifications: * Register also the member category `INVOKE_PUBLIC_METHODS` when `INVOKE_DECLARED_METHODS` is registered (cherry picked from commit ba22da8) Co-authored-by: Nicolas Filotto <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
theme: aot
An issue related to Ahead-of-time processing
type: bug
A general bug
While reviewing missing reachability hints for #31213, I have discussed the reflect-config.json schema and the meaning of its attributes with the GraalVM team. For this issue, we must ensure that our testing infrastructure (hints predicates and the java agent) truly align with the runtime behavior of GraalVM and how is it going to be enforced in the near future.
It turns out that a couple of our assumptions were wrong.
In general, we assume that registering an invocation hint for a field, method or constructor covers also the introspection case. This means that registering
"allDeclaredMethods"
(invoking all declared methods) infers"queryAllDeclaredMethods"
(introspecting all declared methods) and there is no need to register the latter. This part is well aligned with the runtime reflection behavior.On the other hand, so far we assumed that registering a "declared" hint also covered the "public" variant: for example, our current implementation assumes that registering
"allDeclaredMethods"
infers"allPublicMethods"
. This behavior is not consistent for fields, methods and constructors:"allDeclaredConstructors"
infers"allPublicConstructors"
asgetConstructors()
will return a subset ofgetDeclaredConstructors()
. This behavior is not yet fully reflected in the current GraalVM dev build (wrt logged warnings) but should be soon"allDeclaredFields"
does not infer"allPublicFields"
asgetFields()
does not return a subset ofgetDeclaredFields()
, asgetFields()
includes inherited fields butgetDeclaredFields()
does not.getDeclaredMethods()
, asgetMethods()
includes inherited methods butgetDeclaredMethods()
does not.Because of this behavior difference for inherited fields and methods, our reflection hints predicates must be aligned with the expected behavior.
The text was updated successfully, but these errors were encountered: