Only return hosts in the HOST_NAMESPACE from PackageAdmin.getHosts.
@@ -207,7 +207,10 @@ public class PackageAdminImpl implements PackageAdmin
List<BundleWire> hostWires = revision.getWiring().getRequiredWires(null);
for (int i = 0; (hostWires != null) && (i < hostWires.size()); i++)
{
- Bundle b = hostWires.get(i).getProviderWiring().getBundle();
+ BundleWire wire = hostWires.get(i);
+ if (wire.getCapability().getNamespace().equals(BundleRevision.HOST_NAMESPACE))
+ {
+ Bundle b = wire.getProviderWiring().getBundle();
if (b != null)
{
list.add(b);
@@ -215,6 +218,7 @@ public class PackageAdminImpl implements PackageAdmin
}
}
}
+ }
// Convert list to an array.
return (list.isEmpty())
? null
