felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r916921 - in /felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver: Main.java WireImpl.java WireModuleImpl.java proto3/Proto3Resolver.java
Date Sat, 27 Feb 2010 07:13:40 GMT
Author: rickhall
Date: Sat Feb 27 07:13:40 2010
New Revision: 916921

URL: http://svn.apache.org/viewvc?rev=916921&view=rev
Log:
More reexport fixes.

Modified:
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main.java
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/WireImpl.java
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/WireModuleImpl.java
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main.java?rev=916921&r1=916920&r2=916921&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main.java (original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/Main.java Sat
Feb 27 07:13:40 2010
@@ -1014,7 +1014,7 @@
         moduleList.add(
             target = (m = new Module("B"))
                 .providing(new CapabilityImpl(m, Capability.MODULE_NAMESPACE).with("bundle-symbolic-name=B"))
-                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE).with("package=bar")));
+                .providing(new CapabilityImpl(m, Capability.PACKAGE_NAMESPACE).with("package=foo")));
         // Bundle C
         moduleList.add(
             (m = new Module("C"))

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/WireImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/WireImpl.java?rev=916921&r1=916920&r2=916921&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/WireImpl.java
(original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/WireImpl.java
Sat Feb 27 07:13:40 2010
@@ -61,7 +61,9 @@
 
     public String toString()
     {
-        return m_req + " (" + m_importer + ") -> " + m_cap + " (" + m_exporter + ")";
+        return m_importer
+            + " -> " + m_cap.getAttribute(Capability.PACKAGE_ATTR).getValue()
+            + " -> " + m_exporter;
     }
 
     /* (non-Javadoc)

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/WireModuleImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/WireModuleImpl.java?rev=916921&r1=916920&r2=916921&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/WireModuleImpl.java
(original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/WireModuleImpl.java
Sat Feb 27 07:13:40 2010
@@ -82,6 +82,6 @@
 
     public String toString()
     {
-        return m_importer + " -> " + m_capability + " -> " + m_exporter;
+        return m_importer + " -> " + m_packages + " -> " + m_exporter;
     }
 }
\ No newline at end of file

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java?rev=916921&r1=916920&r2=916921&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
(original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
Sat Feb 27 07:13:40 2010
@@ -1322,13 +1322,13 @@
                     }
                     else if (req.getNamespace().equals(Capability.MODULE_NAMESPACE))
                     {
-                        Packages pkgs = modulePkgMap.get(module);
+                        Packages candPkgs = modulePkgMap.get(cand.getModule());
                         moduleWires.add(
                             new WireModuleImpl(module,
                                 req,
                                 cand.getModule(),
                                 cand,
-                                pkgs.getRequiredPackages(cand.getModule())));
+                                candPkgs.getExportedAndReexportedPackages()));
                     }
                 }
             }
@@ -1413,14 +1413,22 @@
             m_usedPkgs.putAll(packages.m_usedPkgs);
         }
 
-        public List<String> getRequiredPackages(Module source)
+        public List<String> getExportedAndReexportedPackages()
         {
             List<String> pkgs = new ArrayList();
+            for (Entry<String, Blame> entry : m_exportedPkgs.entrySet())
+            {
+                pkgs.add((String)
+                    entry.getValue().m_cap.getAttribute(Capability.PACKAGE_ATTR).getValue());
+            }
             for (Entry<String, List<Blame>> entry : m_requiredPkgs.entrySet())
             {
                 for (Blame blame : entry.getValue())
                 {
-                    if (blame.m_cap.getModule().equals(source))
+                    Directive dir = blame.m_reqs.get(
+                        blame.m_reqs.size() - 1).getDirective(Constants.VISIBILITY_DIRECTIVE);
+                    if ((dir != null)
+                        && dir.getValue().equals(Constants.VISIBILITY_REEXPORT))
                     {
                         pkgs.add((String)
                             blame.m_cap.getAttribute(Capability.PACKAGE_ATTR).getValue());



Mime
View raw message