Modified class filtering in the service registry to be less strict, since it
was not allowing a bundle to register a service for a different version
of a class if the registering bundle also had a wire for that class.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@548356 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java b/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
index 2c67dc8..e3764e1 100644
--- a/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
@@ -121,20 +121,10 @@
{
try
{
- // First, try to load the class from the bundle that registered
- // the service.
- Class targetClass = ((BundleImpl) m_bundle)
- .getInfo().getCurrentModule().getClass(clazz.getName());
- if (targetClass != null)
- {
- return (targetClass == clazz);
- }
-
- // If it cannot be found from the registering bundle, then try to load
- // from the service object or service factory class.
+ // Try to load from the service object or service factory class.
Class sourceClass = (m_factory != null)
? m_factory.getClass() : m_svcObj.getClass();
- targetClass = Util.loadClassUsingClass(sourceClass, clazz.getName());
+ Class targetClass = Util.loadClassUsingClass(sourceClass, clazz.getName());
return (targetClass == clazz);
}
catch (Exception ex)