You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (Jira)" <ji...@apache.org> on 2022/07/24 10:45:00 UTC
[jira] [Updated] (JEXL-376) Introspector captures methods on non-exported classes (modules, java9+)
[ https://issues.apache.org/jira/browse/JEXL-376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Biestro updated JEXL-376:
-------------------------------
Assignee: Henri Biestro
> Introspector captures methods on non-exported classes (modules, java9+)
> -----------------------------------------------------------------------
>
> Key: JEXL-376
> URL: https://issues.apache.org/jira/browse/JEXL-376
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.2.1
> Reporter: Henri Biestro
> Assignee: Henri Biestro
> Priority: Major
> Fix For: 3.3
>
>
> WHAT:
> When running on Java9+, module encapsulation shields classes from usage even through reflection. The introspector is unfortunately not aware of this and which leads to unexpected runtime errors.
> Error looks like this:
> <code>
> class org.apache.commons.jexl3.internal.introspection.MethodExecutor cannot access class sun.net.www.protocol.https.HttpsURLConnectionImpl (in module java.base) because module java.base does not export sun.net.www.protocol.https to unnamed module @1e5c7dc
> </code>
> HOW:
> Through reflection (since we are still on Java8), add a check before introspection in the ClassMap.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)