summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-09-24 19:26:41 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-09-24 19:26:41 +0000
commit26f26e8141964519d5cf0fecc692bea4ba997a74 (patch)
tree8d18cd0a38e3b03c26f8eea8bd81039394ce0fec /branches/sca-equinox/modules
parenta2b3bf137479650fc2643cacf750cbecac867039 (diff)
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
Diffstat (limited to 'branches/sca-equinox/modules')
-rw-r--r--branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java10
1 files changed, 7 insertions, 3 deletions
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<URL> 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) {