Closed smcvb closed 9 months ago
I have done some digging. The deprecation has to do with the fact that the JDK will no longer include a SecurityManager
. This means that operations to make methods accessible don't need to make use of the AccessController
anymore.
Making the methods accessible for reflection is still required and will not need to undergo any structural changes.
Enhancement Description
Axon Framework's
ReflectionUtils
has two methods that aren't ideal in the world of JDK17+. Namely:ReflectionUtils#ensureAccessible(T)
, andReflectionUtils#isAccessible(AccessibleObject)
We need to investigate how we will go without these methods entirely to comply with Java's adjustments.
Current Behaviour
The methods
ReflectionUtils#ensureAccessible(T)
andReflectionUtils#isAccessible(AccessibleObject)
are present and used throughout Axon Framework.Wanted Behaviour
Another approach is to keep providing a similar integration level without using
ReflectionUtils#ensureAccessible(T)
andReflectionUtils#isAccessible(AccessibleObject)
.Possible Workarounds
Unclear at this stage.