Author: rickhall
Date: Thu Jan 21 18:41:48 2010
New Revision: 901822

URL: http://svn.apache.org/viewvc?rev=901822&view=rev
Log:
A final few fixes and is appears to be working reasonably well. I will
start to test against the OSGi CT.

Modified:
    
felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
    
felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/util/manifestparser/RequirementImpl.java

Modified: 
felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
URL: 
http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java?rev=901822&r1=901821&r2=901822&view=diff
==============================================================================
--- 
felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
 (original)
+++ 
felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
 Thu Jan 21 18:41:48 2010
@@ -615,18 +615,12 @@
                 // is required.
                 if (clauses.get(clauseIdx).m_attrs.size() != 0)
                 {
-                    // R3 package capabilities should only have name and
-                    // version attributes.
+                    // R3 package capabilities should only have a version 
attribute.
                     List<Attribute> attrs = clauses.get(clauseIdx).m_attrs;
-                    Attribute pkgName = null;
                     Attribute pkgVersion = new 
Attribute(Capability.VERSION_ATTR, Version.emptyVersion, false);
                     for (int attrIdx = 0; attrIdx < attrs.size(); attrIdx++)
                     {
-                        if 
(attrs.get(attrIdx).getName().equals(Capability.PACKAGE_ATTR))
-                        {
-                            pkgName = attrs.get(attrIdx);
-                        }
-                        else if 
(attrs.get(attrIdx).getName().equals(Capability.VERSION_ATTR))
+                        if 
(attrs.get(attrIdx).getName().equals(Capability.VERSION_ATTR))
                         {
                             pkgVersion = attrs.get(attrIdx);
                         }
@@ -642,7 +636,6 @@
                     // Recreate the export to remove any other attributes
                     // and add version if missing.
                     List<Attribute> newAttrs = new ArrayList<Attribute>(2);
-                    newAttrs.add(pkgName);
                     newAttrs.add(pkgVersion);
                     clauses.set(clauseIdx, new ParsedHeaderClause(
                         clauses.get(clauseIdx).m_paths,

Modified: 
felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/util/manifestparser/RequirementImpl.java
URL: 
http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/util/manifestparser/RequirementImpl.java?rev=901822&r1=901821&r2=901822&view=diff
==============================================================================
--- 
felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/util/manifestparser/RequirementImpl.java
 (original)
+++ 
felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/util/manifestparser/RequirementImpl.java
 Thu Jan 21 18:41:48 2010
@@ -39,7 +39,7 @@
     public RequirementImpl(String namespace, List<Directive> dirs, 
List<Attribute> attrs)
     {
         m_namespace = namespace;
-        m_dirs = new ArrayList<Directive>();
+        m_dirs = dirs;
         m_dirsConst = Collections.unmodifiableList(m_dirs);
         m_filter = convertToFilter(attrs);
 


Reply via email to