You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A GraalVM native application will behave like this:
MethodfirstMethod = QueriedClass.class.getMethod("firstMethod");
// this will throw a NoSuchMethodException since no metadata was registeredMethodsecondMethod = QueriedClass.class.getMethod("secondMethod");
// this will return an array with a single method, "firstMethod"Method[] methods = QueriedClass.class.getMethods();
Currently the Java agent and its testing infrastructure will require full method introspection on the type when Class.getMethods() is called. We should instead do the following:
do not require full method reflection on the type when this is called
align other parts of the instrumentation with this principle (fields...)
ensure that key methods on those elements acquired through reflection are instrumented to ensure that they're not used without reflection later in the process. This means that Method.invoke() and other key methods should be instrumented.
The text was updated successfully, but these errors were encountered:
Currently, the
RuntimeHintsAgent
is too strict and does not fully replicate the behavior of a GraalVM native application when it comes to reflection.Assuming the following registered reflection hint:
for the following class
A GraalVM native application will behave like this:
Currently the Java agent and its testing infrastructure will require full method introspection on the type when
Class.getMethods()
is called. We should instead do the following:Method.invoke()
and other key methods should be instrumented.The text was updated successfully, but these errors were encountered: