Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-6921

Fix SPIClassIterator#isParentClassLoader to don't require extra permissions

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This is not really a big issue, because most setups use a "good" context classloader. The context classloader is required by the Java ServiceProvider standard to look for META-INF classes. To work around issues in some setups, the analysis and codec SPIs also scan our own classloader, if it is not a parent of the context one. This check requires permissions, if we are not a parent.

      This will fix the parent check to simply return false (and enforce classpath rescan) if we don't have enough permissions. This is the right thing to do, because if we have no permissions, we are also not a parent!

        Attachments

        1. LUCENE-6921.patch
          3 kB
          Uwe Schindler
        2. LUCENE-6921.patch
          6 kB
          Uwe Schindler
        3. LUCENE-6921-fix.patch
          2 kB
          Uwe Schindler

          Activity

            People

            • Assignee:
              thetaphi Uwe Schindler
              Reporter:
              thetaphi Uwe Schindler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: