commit | a14e91cb70eadf59cca2bf85b25c9422ea34110a | [log] [tgz] |
---|---|---|
author | Richard S. Hall <rickhall@apache.org> | Mon Oct 04 20:14:05 2010 +0000 |
committer | Richard S. Hall <rickhall@apache.org> | Mon Oct 04 20:14:05 2010 +0000 |
tree | 2f60bf7b96e7db65ba555886a2945c4836621b8d | |
parent | e42af329ca95a4f82578314df34f7c3318b7f6ec [diff] |
Unlike ClassLoader.getResources(), Bundle.getResources() should return null. (FELIX-2629) git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1004388 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/BundleImpl.java b/framework/src/main/java/org/apache/felix/framework/BundleImpl.java index dfef85f..4a6afb0 100644 --- a/framework/src/main/java/org/apache/felix/framework/BundleImpl.java +++ b/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
@@ -623,7 +623,10 @@ } } - return getFramework().getBundleResources(this, name); + // Spec says we should return null when resources not found, + // even though ClassLoader.getResources() returns empty enumeration. + Enumeration e = getFramework().getBundleResources(this, name); + return ((e == null) || !e.hasMoreElements()) ? null : e; } /**