commit | 9f9dd1a70aa6a52e9d984c3205b73509e549597a | [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 | a4c7aa083db1ef254791fc8918608f02e7a95809 [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 {