The agent tests validating that the necessary reflection hints have been provided fail when a destroy method is set. The reason is that DisposableBeanAdapter
relies on BeanUtils#findMethodWithMinimalParameters
that itself calls getMethods
on the target class.
It's unclear if GraalVM is supposed to return only the methods that have explicit hints, or if this method should fail if the wider "introspect declared methods" hint isn't set.
The registration of the hint itself is very basic for now, so whatever we end up doing, it would be nice if the logic was harmonized.
Comment From: bclozel
I've created #29091 to align the agent's behavior with GraalVM. Maybe this is superseded?
Comment From: snicoll
Thanks @bclozel. I've removed the workaround in the agent test in 1e8017107a2fd6 and the test passes now.