felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r910622 - /felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java
Date Tue, 16 Feb 2010 17:50:25 GMT
Author: gnodet
Date: Tue Feb 16 17:50:22 2010
New Revision: 910622

URL: http://svn.apache.org/viewvc?rev=910622&view=rev
Log:
FELIX-2081: Attribtues and directives and not used on local resources

Modified:
    felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java

Modified: felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java?rev=910622&r1=910621&r2=910622&view=diff
==============================================================================
--- felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java
(original)
+++ felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java
Tue Feb 16 17:50:22 2010
@@ -409,6 +409,26 @@
                     cap.setName("package");
                     cap.addP(new PropertyImpl("package", null, pkgs[pkgIdx].getName()));
                     cap.addP(new PropertyImpl("version", "version", pkgs[pkgIdx].getVersion().toString()));
+                    for (int i = 0; i < pkgs[pkgIdx].getAttributes().length; i++)
+                    {
+                        R4Attribute attribute = pkgs[pkgIdx].getAttributes()[i];
+                        String key = attribute.getName();
+                        if (key.equalsIgnoreCase("specification-version")
+                                || key.equalsIgnoreCase("version"))
+                            continue;
+                        else
+                        {
+                            Object value = attribute.getValue();
+                            cap.addP(key, value);
+                        }
+                    }
+                    for (int i = 0; i < pkgs[pkgIdx].getDirectives().length; i++)
+                    {
+                        R4Directive directive = pkgs[pkgIdx].getDirectives()[i];
+                        String key = directive.getName();
+                        Object value = directive.getValue();
+                        cap.addP(key, value);
+                    }
                     addCapability(cap);
                 }
             }



Mime
View raw message