-
Enhancement
-
Resolution: Unresolved
-
Critical
-
None
-
None
-
None
-
Undefined
When running Undertow tests I've come across these warnings:
# Created at 2020-11-24T07:46:18.516 WARNING: An illegal reflective access operation has occurred # Created at 2020-11-24T07:46:18.516 WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (file:/home/fla/.m2/repository/org/jboss/xnio/xnio-nio/3.3.8.Final/xnio-nio-3.3.8.Final.jar) to constructor sun.nio.ch.EPollSelectorProvider() # Created at 2020-11-24T07:46:18.516 WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2 # Created at 2020-11-24T07:46:18.516 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations # Created at 2020-11-24T07:46:18.517 WARNING: All illegal access operations will be denied in a future release
XNIO invokes the provider constructor via reflection. I think that we should invoke SelectorProvider.provider instead, unless there is a very good reason for not doing so. If there is a reason, the question that follows is if the reason applies only to JDK8, or if it applies to all JDKs. Keeping in mind that, a possible workaround is using the "java.nio.channels.spi.SelectorProvider" property to configure the specific provider according to OS, even if it has to be don in a trial and error way (ServiceConfigurationError will be thrown if the chosen provider is not available).