felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r738794 - in /felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi: Analyzer.java Builder.java Processor.java
Date Thu, 29 Jan 2009 08:20:52 GMT
Author: mcculls
Date: Thu Jan 29 08:20:51 2009
New Revision: 738794

URL: http://svn.apache.org/viewvc?rev=738794&view=rev
Log:
Re-apply FELIX-843 patch to latest BND code

Modified:
    felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Analyzer.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Processor.java

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Analyzer.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Analyzer.java?rev=738794&r1=738793&r2=738794&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Analyzer.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Analyzer.java Thu Jan 29 08:20:51
2009
@@ -164,7 +164,7 @@
             }
 
             exports = merge("export-package", exportInstructions, contained,
-                    superfluous.keySet());
+                    superfluous.keySet(), null);
 
             for (Iterator<Map.Entry<String, Map<String, String>>> i = superfluous
                     .entrySet().iterator(); i.hasNext();) {
@@ -196,7 +196,7 @@
             // merge the info for matching packages
             Set<String> extra = new TreeSet<String>(importInstructions.keySet());
             imports = merge("import-package", importInstructions,
-                    referredAndExported, extra);
+                    referredAndExported, extra, ignored);
 
             // Instructions that have not been used could be superfluous
             // or if they do not contain wildcards, should be added
@@ -626,13 +626,13 @@
         if (bndInfo == null) {
             bndInfo = new Properties();
             try {
-                InputStream in = getClass().getResourceAsStream("bnd.info");
+                InputStream in = Analyzer.class.getResourceAsStream("bnd.info");
                 if (in != null) {
                     bndInfo.load(in);
                     in.close();
                 }
             } catch (IOException ioe) {
-                warning("Could not read bnd.info in " + getClass().getPackage()
+                warning("Could not read bnd.info in " + Analyzer.class.getPackage()
                         + ioe);
             }
         }

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java?rev=738794&r1=738793&r2=738794&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java Thu Jan 29 08:20:51
2009
@@ -266,7 +266,7 @@
             // Private-Package
             Map<String, Map<String, String>> filtered = merge(
                     CONDITIONAL_PACKAGE, conditionals, imports,
-                    new HashSet<String>());
+                    new HashSet<String>(), null);
 
             // Imports can also specify a private import. These
             // packages must also be copied to the bundle

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Processor.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Processor.java?rev=738794&r1=738793&r2=738794&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Processor.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/osgi/Processor.java Thu Jan 29 08:20:51
2009
@@ -664,8 +664,9 @@
 
     public static Map<String, Map<String, String>> merge(String type,
             Map<String, Map<String, String>> instructions,
-            Map<String, Map<String, String>> actual, Set<String> superfluous)
{
-        Map<String, Map<String, String>> ignored = newMap();
+            Map<String, Map<String, String>> actual,
+            Set<String> superfluous,
+            Map<String, Map<String,String>> ignored) {
         Map<String, Map<String, String>> toVisit = new HashMap<String, Map<String,
String>>(
                 actual); // we do not want to ruin our
         // original
@@ -706,7 +707,7 @@
                         newAttributes.putAll(actual.get(packageName));
                         newAttributes.putAll(instructedAttributes);
                         result.put(packageName, newAttributes);
-                    } else {
+                    } else if (ignored != null) {
                         ignored.put(packageName, new HashMap<String, String>());
                     }
                     p.remove(); // Can never match again for another pattern



Mime
View raw message