You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2008/09/03 06:45:27 UTC

svn commit: r691514 - /tuscany/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHost.java

Author: rfeng
Date: Tue Sep  2 21:45:27 2008
New Revision: 691514

URL: http://svn.apache.org/viewvc?rev=691514&view=rev
Log:
Fix NPE as now getServiceDiscoverer is non-static

Modified:
    tuscany/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHost.java

Modified: tuscany/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHost.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHost.java?rev=691514&r1=691513&r2=691514&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHost.java (original)
+++ tuscany/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHost.java Tue Sep  2 21:45:27 2008
@@ -148,8 +148,10 @@
                 try {
                     b.start();
                     Class<?> discovererClass = b.loadClass("org.apache.tuscany.sca.extensibility.ServiceDiscovery");
+                    Method getInstance = discovererClass.getMethod("getInstance");
+                    Object instance = getInstance.invoke(null);
                     Method getter = discovererClass.getMethod("getServiceDiscoverer");
-                    Object discoverer = getter.invoke(null);
+                    Object discoverer = getter.invoke(instance);
 
                     Method getCL = discoverer.getClass().getMethod("getContextClassLoader");
                     ClassLoader cl = (ClassLoader)getCL.invoke(discoverer);