Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-2670

[Framework] Implicit boot delegation doesn't delegate for external code in all cases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • framework-3.0.5
    • framework-3.0.6
    • Framework
    • None

    Description

      When determining if a class is not from a bundle in ModuleImpl.isClassNotLoadedFromBundle() (terrible method name, by the way), it attempts to ignore all framework classes by checking if the target class' class loader is the same as the framework's class loader. This check is too broad since the framework's class loader is typically the app class loader, which means that any other code on the class path will not trigger implicit boot delegation.

      You could argue that implicit boot delegation was intended for JRE code and this is ok. However, just by changing the framework launcher to use a different class loader for the framework, you would get implicit boot delegation for code on the class path, so it seems odd that we trigger it under one situation but not another.

      Perhaps the simple solution is to not perform a class loader check, but to compare the package namespace (i.e., use org.apache.felix.framework to determine framework classes).

      Attachments

        1. FELIX-2670.txt
          6 kB
          Richard S. Hall

        Activity

          People

            rickhall Richard S. Hall
            rickhall Richard S. Hall
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: