commit | 6000d39105649aa7cb77074698b004bb7c79ad2d | [log] [tgz] |
---|---|---|
author | Marcel Offermans <marrs@apache.org> | Wed Jul 27 09:44:09 2011 +0000 |
committer | Marcel Offermans <marrs@apache.org> | Wed Jul 27 09:44:09 2011 +0000 |
tree | 33e842873e29012eb5e6c079aca7eab27e8e333a | |
parent | fd21fb1e58971b271614e817c0175d4db1f2aeb3 [diff] |
FELIX-3057 fixed the bug git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1151402 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/index/BundleContextInterceptor.java b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/index/BundleContextInterceptor.java index c76cbd4..51cc43d 100644 --- a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/index/BundleContextInterceptor.java +++ b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/index/BundleContextInterceptor.java
@@ -89,6 +89,9 @@ } } } + if (result == null || result.size() == 0) { + return null; + } return (ServiceReference[]) result.toArray(new ServiceReference[result.size()]); } else { @@ -102,6 +105,9 @@ FilterIndex filterIndex = m_cache.hasFilterIndexFor(clazz, filter); if (filterIndex != null) { List /* <ServiceReference> */ result = filterIndex.getAllServiceReferences(clazz, filter); + if (result == null || result.size() == 0) { + return null; + } return (ServiceReference[]) result.toArray(new ServiceReference[result.size()]); } else {