Adwait Kumar Singh created LOG4J2-3642:
------------------------------------------

             Summary: Consider Osgi versions older than 1.5 as not available.
                 Key: LOG4J2-3642
                 URL: https://issues.apache.org/jira/browse/LOG4J2-3642
             Project: Log4j 2
          Issue Type: Bug
          Components: OSGi
    Affects Versions: 2.17.2, 2.19.0
            Reporter: Adwait Kumar Singh


We use the method 
[FrameworkUtil.getBundle|https://github.com/apache/logging-log4j2/blob/release-2.x/log4j-core/src/main/java/org/apache/logging/log4j/core/osgi/BundleContextSelector.java#L59]
 from OSGi, but this method was added [only in OSGi 
1.5|https://github.com/osgi/osgi/blob/main/org.osgi.framework/src/org/osgi/framework/FrameworkUtil.java#L224],
 this causes NoSuchMethodError if older version of OSGi is used.

I would suggest to consider OSGi being unavailable for OSGi version < 1.5 or 
when that method is not available.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to