Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-376

Introspector captures methods on non-exported classes (modules, java9+)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.1
    • 3.3
    • None

    Description

      WHAT:
      When running on Java9+, module encapsulation shields classes from usage even through reflection. The introspector is unfortunately not aware of this leading 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 compiling/releasing on Java8), add a check before introspection in the ClassMap.

      Attachments

        Activity

          People

            henrib Henri Biestro
            henrib Henri Biestro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: