You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by dj...@apache.org on 2015/08/30 07:34:13 UTC

svn commit: r1700091 - in /felix/trunk/gogo: command/src/main/java/org/apache/felix/gogo/command/Activator.java shell/src/main/java/org/apache/felix/gogo/shell/Activator.java

Author: djencks
Date: Sun Aug 30 05:34:13 2015
New Revision: 1700091

URL: http://svn.apache.org/r1700091
Log:
[FELIX-5021] Use the system bundle to find bundles to look at for shell and info wiring commands

Modified:
    felix/trunk/gogo/command/src/main/java/org/apache/felix/gogo/command/Activator.java
    felix/trunk/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Activator.java

Modified: felix/trunk/gogo/command/src/main/java/org/apache/felix/gogo/command/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/command/src/main/java/org/apache/felix/gogo/command/Activator.java?rev=1700091&r1=1700090&r2=1700091&view=diff
==============================================================================
--- felix/trunk/gogo/command/src/main/java/org/apache/felix/gogo/command/Activator.java (original)
+++ felix/trunk/gogo/command/src/main/java/org/apache/felix/gogo/command/Activator.java Sun Aug 30 05:34:13 2015
@@ -29,6 +29,7 @@ public class Activator implements Bundle
 
     public void start(BundleContext bc) throws Exception
     {
+        BundleContext systemBundleContext = bc.getBundle(0).getBundleContext();
         Hashtable props = new Hashtable();
         props.put("osgi.command.scope", "felix");
         props.put("osgi.command.function", new String[] {
@@ -37,7 +38,7 @@ public class Activator implements Bundle
             "resolve", "start", "stop", "uninstall", "update",
             "which" });
         bc.registerService(
-            Basic.class.getName(), new Basic(bc), props);
+            Basic.class.getName(), new Basic(systemBundleContext), props);
 
         // Register "inspect" command for R4.3 or R4.2 depending
         // on the underlying framework.
@@ -47,7 +48,7 @@ public class Activator implements Bundle
         {
             getClass().getClassLoader().loadClass("org.osgi.framework.wiring.BundleWiring");
             bc.registerService(
-                Inspect.class.getName(), new Inspect(bc), props);
+                Inspect.class.getName(), new Inspect(systemBundleContext), props);
         }
         catch (Throwable th)
         {

Modified: felix/trunk/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Activator.java?rev=1700091&r1=1700090&r2=1700091&view=diff
==============================================================================
--- felix/trunk/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Activator.java (original)
+++ felix/trunk/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Activator.java Sun Aug 30 05:34:13 2015
@@ -99,7 +99,7 @@ public class Activator implements Bundle
         dict.put(CommandProcessor.COMMAND_SCOPE, "gogo");
 
         // register converters
-        regs.add(context.registerService(Converter.class.getName(), new Converters(context), null));
+        regs.add(context.registerService(Converter.class.getName(), new Converters(context.getBundle(0).getBundleContext()), null));
 
         // register commands