From 26f26e8141964519d5cf0fecc692bea4ba997a74 Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 24 Sep 2008 19:26:41 +0000 Subject: Issue a warning when a resource entry is contained in a unresolved bundle git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@698700 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/extensibility/equinox/EquinoxServiceDiscoverer.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'branches/sca-equinox/modules') diff --git a/branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java b/branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java index cdf47230e4..8ec80b5eaf 100644 --- a/branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java +++ b/branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java @@ -209,14 +209,18 @@ public class EquinoxServiceDiscoverer implements ServiceDiscoverer { Enumeration urls = null; try { // Use getResources to find resources on the classpath of the bundle - // Please note if there is an DynamicImport-Package=*, and another bundle - // exports the resource package, there is a possiblity that it doesn't + // Please note there are cases that getResources will return null even + // the bundle containing such entries: + // 1. There is a match on Import-Package or DynamicImport-Package, and another + // bundle exports the resource package, there is a possiblity that it doesn't // find the containing entry + // 2. The bundle cannot be resolved, then getResources will return null urls = bundle.getResources(serviceName); if (urls == null) { URL entry = bundle.getEntry(serviceName); if (entry != null) { - urls = Collections.enumeration(Arrays.asList(entry)); + logger.warning("Unresolved resource " + serviceName + " found in " + toString(bundle)); + // urls = Collections.enumeration(Arrays.asList(entry)); } } } catch (IOException e) { -- cgit v1.2.3