Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
framework-1.6.0
-
None
Description
- bundle A defines an interface R and a class S in different packages, whith S implementing R
- bundle B defines a class T extending S, it has an import statement on S package, but not on R package
- bundle C defines a ServiceFactory that export T service without any import on any package from R, S, T
in this case, the line 426 of ServiceRegistrationImpl is executed:
allow = getServiceRegistration().isClassAccessible(requestClass);
which looks like:
protected boolean isClassAccessible(Class clazz)
{
try
catch (Exception ex)
{ // Ignore this and return false. } return false;
}
So felix checks if the classloader used to load the factory can also load the interface, which is not the case in my example.
So isClassAccessible returns false and the event is not dispatched to the service listener.