You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2019/09/05 05:28:42 UTC
[GitHub] [httpcomponents-core] rhernandez35 opened a new pull request #146:
Set accessiblity flag on reflected methods in ReflectionUtils
rhernandez35 opened a new pull request #146: Set accessiblity flag on reflected methods in ReflectionUtils
URL: https://github.com/apache/httpcomponents-core/pull/146
Prior to this change, attempts to reflectively invoke methods on
protected classes in other modules could fail on JDK9 and above.
Currently, the methods in ReflectionUtils are only used to get and set
properties related to ALPN on SSLEngine instances at runtime. On JDK11,
reflectively invoking the `getApplicationProtocol` method on
`SSLEngineImpl`, a protected class, throws an `IllegalAccessException`.
`callGetter` swallows this and returns `null`, causing the client
runtime to ignore whatever protocol was negotiated with ALPN and default
to HTTP/1.1.
This specific reflective access is still illegal and will eventually
break in a future Java release. A proper fix would require creating a
multi-release jar with a dedicated SSLEngine accessor class for JDK9+
that can natively invoke these methods.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org