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 2010/01/28 19:11:20 UTC

svn commit: r904193 - /felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java

Author: rickhall
Date: Thu Jan 28 18:11:20 2010
New Revision: 904193

URL: http://svn.apache.org/viewvc?rev=904193&view=rev
Log:
Ignore constraint conflicts between imported packages and required/exported
packages, since imported packages override them.

Modified:
    felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java

Modified: felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java?rev=904193&r1=904192&r2=904193&view=diff
==============================================================================
--- felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java (original)
+++ felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java Thu Jan 28 18:11:20 2010
@@ -685,10 +685,16 @@
             Blame currentImportedBlame = currentPkgs.m_importedPkgs.get(pkgName);
             List<Blame> currentRequiredBlames = currentPkgs.m_requiredPkgs.get(pkgName);
 
+            // We don't need to worry about an import conflicting with a required
+            // bundle's export, since imported package wires are terminal the
+            // bundle will never see the exported package from the required bundle.
+// TODO: FELIX3 - See scenario 21, this seems odd.
             if (!requires &&
-                (((currentExportedBlame != null) && !currentExportedBlame.m_cap.equals(candBlame.m_cap))
-                || ((currentImportedBlame != null) && !currentImportedBlame.m_cap.equals(candBlame.m_cap))
-                || ((currentRequiredBlames != null) && !currentRequiredBlames.contains(candBlame))))
+                (currentImportedBlame != null) && !currentImportedBlame.m_cap.equals(candBlame.m_cap))
+//            if (!requires &&
+//                (((currentExportedBlame != null) && !currentExportedBlame.m_cap.equals(candBlame.m_cap))
+//                || ((currentImportedBlame != null) && !currentImportedBlame.m_cap.equals(candBlame.m_cap))))
+//                || ((currentRequiredBlames != null) && !currentRequiredBlames.contains(candBlame))))
             {
                 throw new ResolveException("Constraint violation between "
                     + current + " and " + candBlame.m_cap.getModule()