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
See #2317. The default value of the --illegal-access command-line option was changed to deny for Java 16, which brought to our attention that we are not properly guarding for this when we perform illegal reflective access in ExecutorServiceMetrics. Users may be eagerly setting --illegal-access=deny prior to Java 16, so we should guard against this even in maintenance branches that don't claim to support Java 16.
The text was updated successfully, but these errors were encountered:
This is an issue with our current implementation for getting at the wrapped ThreadPoolExecutor in some types returned by Executors, when --illegal-access=deny is set. This is the default from Java 16. Without these changes, an uncaught exception is thrown when trying to perform the reflective access on binding ExecutorServiceMetrics with one of the private type ExecutorService in Executors.
With these changes, the exception will be caught and logged. We end up catching all RuntimeExceptions since we cannot use the InaccessibleObjectException type introduced in Java 9, but this is probably fine in this implementation anyways.
Resolvesmicrometer-metricsgh-2447
shakuzen
changed the title
Guard against InaccessibleObjectException with --illegal-access=deny
Guard against InaccessibleObjectException when --illegal-access=deny
Feb 17, 2021
See #2317. The default value of the
--illegal-access
command-line option was changed todeny
for Java 16, which brought to our attention that we are not properly guarding for this when we perform illegal reflective access in ExecutorServiceMetrics. Users may be eagerly setting--illegal-access=deny
prior to Java 16, so we should guard against this even in maintenance branches that don't claim to support Java 16.The text was updated successfully, but these errors were encountered: