FELIX-5173 - Metatype service's BundleResources ignore properties provided by fragment bundles
- use getResource instead of getEntry to allow fragments to supply localization resources.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1728499 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/metatype/changelog.txt b/metatype/changelog.txt
index 75a9a38..dcab5c1 100644
--- a/metatype/changelog.txt
+++ b/metatype/changelog.txt
@@ -1,3 +1,10 @@
+Changes from 1.1.2 to ...
+-------------------------
+
+** Bug
+ * [FELIX-5173] - Metatype service's BundleResources ignore properties provided by fragment bundles
+
+
Changes from 1.1.0 to 1.1.2
---------------------------
@@ -18,6 +25,7 @@
** Improvement
* [FELIX-4649] - Get MetaTypeInformation while bundle is starting
+ * [FELIX-4687] - Support v. 1.3 metatype namespace
** Bug
* [FELIX-4644] - Designates with multiple Objects
diff --git a/metatype/src/main/java/org/apache/felix/metatype/DefaultMetaTypeProvider.java b/metatype/src/main/java/org/apache/felix/metatype/DefaultMetaTypeProvider.java
index b005551..fc14423 100644
--- a/metatype/src/main/java/org/apache/felix/metatype/DefaultMetaTypeProvider.java
+++ b/metatype/src/main/java/org/apache/felix/metatype/DefaultMetaTypeProvider.java
@@ -39,7 +39,7 @@
/**
* The <code>DefaultMetaTypeProvider</code> class is an implementation of the
- * <code>MetaTypeProvider</code> interface whichis configured for a given
+ * <code>MetaTypeProvider</code> interface which is configured for a given
* bundle using a {@link MetaData} object.
* <p>
* This class may be used by clients, e.g. <code>ManagedService</code> or
diff --git a/metatype/src/main/java/org/apache/felix/metatype/internal/l10n/BundleResources.java b/metatype/src/main/java/org/apache/felix/metatype/internal/l10n/BundleResources.java
index 5e1216d..4a5c375 100644
--- a/metatype/src/main/java/org/apache/felix/metatype/internal/l10n/BundleResources.java
+++ b/metatype/src/main/java/org/apache/felix/metatype/internal/l10n/BundleResources.java
@@ -165,12 +165,14 @@
resourceName += ".properties";
Properties props = new Properties( parentProperties );
- URL resURL = bundle.getEntry( resourceName );
+ // FELIX-5173 - allow the resource to be provided by fragments as well...
+ URL resURL = bundle.getResource( resourceName );
// FELIX-607 backwards compatibility, support
if ( resURL == null )
{
- resURL = bundle.getEntry( MetaTypeService.METATYPE_DOCUMENTS_LOCATION + "/" + resourceName );
+ // FELIX-5173 - allow the resource to be provided by fragments as well...
+ resURL = bundle.getResource( MetaTypeService.METATYPE_DOCUMENTS_LOCATION + "/" + resourceName );
}
if ( resURL != null )