aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwr...@apache.org
Subject svn commit: r1729588 - /aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/ResolveContext.java
Date Wed, 10 Feb 2016 12:35:54 GMT
Author: jwross
Date: Wed Feb 10 12:35:54 2016
New Revision: 1729588

URL: http://svn.apache.org/viewvc?rev=1729588&view=rev
Log:
[ARIES-1445] Bundles that are not direct dependencies of a subsystem can be removed while
still in use

Remove unnecessary code. The special check for a requirement namespace of osgi.service when
no wires exist is no longer necessary. Requirements in the osgi.service
namespace and effective directive value not equal to "resolve" are now handled, along with
all other similar cases, by the first check in findProviders.

Modified:
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/ResolveContext.java

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/ResolveContext.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/ResolveContext.java?rev=1729588&r1=1729587&r2=1729588&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/ResolveContext.java
(original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/ResolveContext.java
Wed Feb 10 12:35:54 2016
@@ -40,7 +40,6 @@ import org.osgi.framework.namespace.Nati
 import org.osgi.framework.namespace.PackageNamespace;
 import org.osgi.framework.wiring.BundleRevision;
 import org.osgi.framework.wiring.BundleWiring;
-import org.osgi.namespace.service.ServiceNamespace;
 import org.osgi.resource.Capability;
 import org.osgi.resource.Namespace;
 import org.osgi.resource.Requirement;
@@ -124,10 +123,6 @@ public class ResolveContext extends org.
 	}
 	
 	private void processWires(Collection<Wire> wires, Requirement requirement, List<Capability>
capabilities) {
-		if (wires.isEmpty()) {
-			handleNoWires(requirement, capabilities);
-			return;
-		}
 		for (Wire wire : wires) {
 			processWire(wire, requirement, capabilities);
 		}
@@ -158,19 +153,6 @@ public class ResolveContext extends org.
 		processWires(wires, requirement, capabilities);
 	}
 	
-	private void handleNoWires(Requirement requirement, List<Capability> capabilities)
{
-		String namespace = requirement.getNamespace();
-		if (!ServiceNamespace.SERVICE_NAMESPACE.equals(namespace)) {
-			return;
-		}
-		try {
-			addDependenciesFromSystemRepository(requirement, capabilities);
-		}
-		catch (Exception e) {
-			Utils.handleTrowable(e);
-		}
-	}
-	
 	private void processAsSubstitutableExport(Requirement requirement, List<Capability>
capabilities) {
 		String namespace = requirement.getNamespace();
 		if (!PackageNamespace.PACKAGE_NAMESPACE.equals(namespace)) {



Mime
View raw message