Michael Lipp created FELIX-6077:
-----------------------------------

             Summary: Wrong state check in LoggerFactory.getLogger
                 Key: FELIX-6077
                 URL: https://issues.apache.org/jira/browse/FELIX-6077
             Project: Felix
          Issue Type: Bug
          Components: Log Service
    Affects Versions: log-1.2.0
            Reporter: Michael Lipp


According to the 
[specification|https://osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/log/LoggerFactory.html#getLogger-org.osgi.framework.Bundle-java.lang.String-java.lang.Class-]
 of "<L extends Logger> L getLogger(Bundle bundle, String name, Class<L> 
loggerType)":

Throws: IllegalArgumentException - If the specified type is not a supported 
Logger type or the specified Bundle is not a resolved bundle.

Taking into account the life cycle in OSGi 7 Core 4.4.2 "Bundle State", 
STARTING, ACTIVE and STOPPING are all substates of RESOLVED. The [implemented 
check|https://github.com/apache/felix/blob/2d559f601b2d077f34d83e924f9db37cc079b9c9/log/src/main/java/org/apache/felix/log/LogServiceImpl.java#L150],
 however, allows only bundles in state RESOLVED and ACTIVE to be passed.






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to