You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2014/01/20 22:25:05 UTC
svn commit: r1559832 -
/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
Author: rickhall
Date: Mon Jan 20 21:25:04 2014
New Revision: 1559832
URL: http://svn.apache.org/r1559832
Log:
Modify extension bundle parsing to assume "framework" is the default value
for the extension directive on extension bundle Fragment-Host headers. (FELIX-4355)
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java?rev=1559832&r1=1559831&r2=1559832&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java Mon Jan 20 21:25:04 2014
@@ -1547,25 +1547,24 @@ public class ManifestParser
if (clauses.size() == 1)
{
- // See if there is the "extension" directive.
for (Entry<String, String> entry : clauses.get(0).m_dirs.entrySet())
{
if (Constants.EXTENSION_DIRECTIVE.equals(entry.getKey()))
{
- // If the extension directive is specified, make sure
- // the target is the system bundle.
- if (FelixConstants.SYSTEM_BUNDLE_SYMBOLICNAME.equals(clauses.get(0).m_paths.get(0)) ||
- Constants.SYSTEM_BUNDLE_SYMBOLICNAME.equals(clauses.get(0).m_paths.get(0)))
- {
- return entry.getValue();
- }
- else
- {
- throw new BundleException(
- "Only the system bundle can have extension bundles.");
- }
+ result = entry.getValue();
}
}
+
+ if (FelixConstants.SYSTEM_BUNDLE_SYMBOLICNAME.equals(clauses.get(0).m_paths.get(0)) ||
+ Constants.SYSTEM_BUNDLE_SYMBOLICNAME.equals(clauses.get(0).m_paths.get(0)))
+ {
+ result = (result == null) ? Constants.EXTENSION_FRAMEWORK : result;
+ }
+ else if (result != null)
+ {
+ throw new BundleException(
+ "Only the system bundle can have extension bundles.");
+ }
}
return result;